From 238e3707c8a305fbdc8a2af85de792a48af364ab Mon Sep 17 00:00:00 2001 From: Arkshine Date: Sat, 16 Aug 2014 01:25:52 +0200 Subject: [PATCH] Compiler: Fix linux compilation. --- compiler/libpc300/sc2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/libpc300/sc2.c b/compiler/libpc300/sc2.c index 01c79ca7..5ed8c504 100755 --- a/compiler/libpc300/sc2.c +++ b/compiler/libpc300/sc2.c @@ -921,7 +921,7 @@ static int command(void) if (skiplevel==iflevel) preproc_expr(&val,NULL); /* get, but ignore the expression */ else - lptr=strchr(lptr,'\0'); + lptr=(unsigned char*)strchr((char*)lptr,'\0'); } /* if */ } else { /* previous conditions were all FALSE */ @@ -932,7 +932,7 @@ static int command(void) if (skiplevel==iflevel) { preproc_expr(&val,NULL); /* get value (or 0 on error) */ } else { - lptr=strchr(lptr,'\0'); + lptr=(unsigned char*)strchr((char*)lptr,'\0'); val=0; } /* if */ ifstack[iflevel-1]=(char)(val ? PARSEMODE : SKIPMODE); @@ -1379,7 +1379,7 @@ static int command(void) lptr++; if (!SKIPPING) { str=strtok((char*)lptr, "\n"); - error(234, str != NULL ? str : lptr); /* user warning, and remove unnecessary newline */ + error(234, str != NULL ? str : (char*)lptr); /* user warning, and remove unnecessary newline */ } break; default: