diff --git a/src/libCom/calc/postfix.c b/src/libCom/calc/postfix.c index c71c615d0..8ff596d3d 100644 --- a/src/libCom/calc/postfix.c +++ b/src/libCom/calc/postfix.c @@ -291,7 +291,7 @@ long epicsShareAPI postfix(const char *pin,char *ppostfix,short *perror) strcpy(infix,pin); /* convert infix expression to upper case */ for (pc=pinfix; *pc; pc++) { - if (islower(*pc)) *pc = toupper(*pc); + if (islower((int)*pc)) *pc = toupper((int)*pc); } /* place the expression elements into postfix */ diff --git a/src/libCom/calc/sCalcPerform.c b/src/libCom/calc/sCalcPerform.c index 1903c5745..2c5bc1eda 100644 --- a/src/libCom/calc/sCalcPerform.c +++ b/src/libCom/calc/sCalcPerform.c @@ -303,7 +303,7 @@ epicsShareFunc long epicsShareAPI case FETCH: ++pd; ++post; - *pd = (*post < numArgs) ? parg[*post] : 0; + *pd = (*post < numArgs) ? parg[(int)*post] : 0; break; case STORE: @@ -646,7 +646,7 @@ printf(") \n"); INC(ps); ++post; ps->s = NULL; - ps->d = (*post < numArgs) ? parg[*post] : 0; + ps->d = (*post < numArgs) ? parg[(int)*post] : 0; break; case SFETCH: @@ -654,8 +654,8 @@ printf(") \n"); ++post; if (*post < numSArgs) { /* fetch from string variable */ - ps->s = calloc(strlen(psarg[*post])+1, 1); - strcpy(ps->s, psarg[*post]); + ps->s = calloc(strlen(psarg[(int)*post])+1, 1); + strcpy(ps->s, psarg[(int)*post]); } else { /* fetch from variable that caller did not supply */ ps->s = calloc(1, 1); diff --git a/src/libCom/macLib/macUtil.c b/src/libCom/macLib/macUtil.c index 4aa8c43ab..71c7d9bfc 100644 --- a/src/libCom/macLib/macUtil.c +++ b/src/libCom/macLib/macUtil.c @@ -92,7 +92,7 @@ epicsShareAPI macParseDefns( switch ( state ) { case preName: - if ( !quote && !escape && ( isspace( *c ) || *c == ',' ) ) break; + if ( !quote && !escape && ( isspace( (int) *c ) || *c == ',' ) ) break; ptr[num] = c; state = inName; /* fall through (may be empty name) */ @@ -100,7 +100,7 @@ epicsShareAPI macParseDefns( case inName: if ( quote || escape || ( *c != '=' && *c != ',' ) ) break; end[num] = c; - while ( end[num] > ptr[num] && isspace( *( end[num] - 1 ) ) ) + while ( end[num] > ptr[num] && isspace( (int) *( end[num] - 1 ) ) ) end[num]--; num++; del[num] = FALSE; @@ -110,7 +110,7 @@ epicsShareAPI macParseDefns( /* fall through (','; will delete) */ case preValue: - if ( !quote && !escape && isspace( *c ) ) break; + if ( !quote && !escape && isspace( (int) *c ) ) break; ptr[num] = c; state = inValue; /* fall through (may be empty value) */ @@ -118,7 +118,7 @@ epicsShareAPI macParseDefns( case inValue: if ( quote || escape || *c != ',' ) break; end[num] = c; - while ( end[num] > ptr[num] && isspace( *( end[num] - 1 ) ) ) + while ( end[num] > ptr[num] && isspace( (int) *( end[num] - 1 ) ) ) end[num]--; num++; del[num] = FALSE; @@ -138,7 +138,7 @@ epicsShareAPI macParseDefns( break; case inName: end[num] = c; - while ( end[num] > ptr[num] && isspace( *( end[num] - 1 ) ) ) + while ( end[num] > ptr[num] && isspace( (int) *( end[num] - 1 ) ) ) end[num]--; num++; del[num] = TRUE; @@ -146,7 +146,7 @@ epicsShareAPI macParseDefns( ptr[num] = c; case inValue: end[num] = c; - while ( end[num] > ptr[num] && isspace( *( end[num] - 1 ) ) ) + while ( end[num] > ptr[num] && isspace( (int) *( end[num] - 1 ) ) ) end[num]--; num++; del[num] = FALSE; diff --git a/src/libCom/misc/epicsString.c b/src/libCom/misc/epicsString.c index d49704ddf..23b91d3cd 100644 --- a/src/libCom/misc/epicsString.c +++ b/src/libCom/misc/epicsString.c @@ -63,7 +63,7 @@ int dbTranslateEscape(char *to, const char *from) pfrom++; /*skip the x*/ for(i=0; i<2; i++) { - if(!isxdigit(*pfrom)) break; + if(!isxdigit((int)*pfrom)) break; strval[i] = *pfrom++; } sscanf(strval,"%x",&ival);