Fixed compiler warnings connected to missing char->int casts
This commit is contained in:
@@ -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 */
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user