From 79e96213e02064cedceaa5844f495b936f714b1f Mon Sep 17 00:00:00 2001 From: "Janet B. Anderson" Date: Wed, 13 May 1998 19:51:37 +0000 Subject: [PATCH] Warning messages changes. --- src/libCom/calc/sCalcPerform.c | 12 +++++------- src/libCom/calc/sCalcPostfix.c | 9 ++++----- src/libCom/sCalcPerform.c | 12 +++++------- src/libCom/sCalcPostfix.c | 9 ++++----- 4 files changed, 18 insertions(+), 24 deletions(-) diff --git a/src/libCom/calc/sCalcPerform.c b/src/libCom/calc/sCalcPerform.c index 0e5409768..151302887 100644 --- a/src/libCom/calc/sCalcPerform.c +++ b/src/libCom/calc/sCalcPerform.c @@ -244,7 +244,7 @@ static char *findConversionIndicator(char *s) return(retval); } -#if DEBUG +#if 0 /* Override standard EPICS expression evaluator (if we're loaded after it) */ epicsShareFunc long epicsShareAPI calcPerform(double *parg, double *presult, char *post) @@ -787,7 +787,7 @@ printf(") \n"); for (got_if=1; got_if>0 && *(post+1) != END_STACK; ++post) { switch(post[1]) { case LITERAL: post+=8; break; - case SLITERAL: post++; while (post[1]) post++; break; + case SLITERAL: post++; while (post[1]) post++; break; case COND_IF: got_if++; break; case COND_ELSE: got_if--; break; case FETCH: case SFETCH: post++; break; @@ -804,7 +804,7 @@ printf(") \n"); for (got_if=1; got_if>0 && *(post+1) != END_STACK; ++post) { switch(post[1]) { case LITERAL: post+=8; break; - case SLITERAL: post++; while (post[1]) post++; break; + case SLITERAL: post++; while (post[1]) post++; break; case COND_IF: got_if++; break; case COND_ELSE: got_if--; break; case FETCH: case SFETCH: post++; break; @@ -1242,7 +1242,6 @@ printf(") \n"); default: case '*': cleanup(top, ps1); return(-1); - break; case 'c': case 'd': case 'i': case 'o': case 'u': case 'x': case 'X': toDouble(ps1); @@ -1278,7 +1277,6 @@ printf(") \n"); default: case 'p': case 'w': case 'n': case '$': cleanup(top, ps1); return(-1); - break; case 'd': case 'i': if (s[-1] == 'h') { sscanf(ps->s, ps1->s, &h); @@ -1331,14 +1329,14 @@ printf(") \n"); toString(ps); k = strlen(ps->s); if (isDouble(ps1)) { - i = ps1->d; + i = (int)ps1->d; if (i < 0) i += k; } else { s = strstr(ps->s, ps1->s); i = s ? (s - ps->s) + strlen(ps1->s) : 0; } if (isDouble(ps2)) { - j = ps2->d; + j = (int)ps2->d; if (j < 0) j += k; } else { if (*(ps2->s)) { diff --git a/src/libCom/calc/sCalcPostfix.c b/src/libCom/calc/sCalcPostfix.c index 385c6f04d..8bbe1dad1 100644 --- a/src/libCom/calc/sCalcPostfix.c +++ b/src/libCom/calc/sCalcPostfix.c @@ -161,8 +161,7 @@ struct expression_element{ * then try to find BS therefore ABS must be first in this list */ static struct expression_element elements[] = { -/* -element i_s_p i_c_p type_element internal_rep */ +/* element i_s_p i_c_p type_element internal_rep */ "ABS", 7, 8, UNARY_OPERATOR, ABS_VAL, /* absolute value */ "NOT", 7, 8, UNARY_OPERATOR, UNARY_NEG, /* unary negate */ "-", 7, 8, MINUS_OPERATOR, UNARY_NEG, /* unary negate (or binary op) */ @@ -269,7 +268,7 @@ static struct expression_element fetch_string_element = { static int strncasecmp(char *s1, char *s2, size_t n) { short i; - for (i=0; i toupper((int)*s2)) return(1); if (toupper((int)*s1) < toupper((int)*s2)) return(-1); } @@ -342,7 +341,7 @@ register short *pno_bytes, *parg; } -#if DEBUG +#if 0 /* Override standard EPICS expression evaluator (if we're loaded after it). */ long epicsShareAPI postfix(char *pinfix,char *ppostfix,short *perror) { @@ -421,7 +420,7 @@ long epicsShareAPI sCalcPostfix(char *pinfix, char **pp_postfix, short *perror) *ppostfix++ = pelement->code; /* if this is a variable reference, append variable number */ - if ((pelement->code == FETCH) || (pelement->code == SFETCH)) { + if ((pelement->code == (char)FETCH) || (pelement->code == (char)SFETCH)) { *ppostfix++ = arg; } diff --git a/src/libCom/sCalcPerform.c b/src/libCom/sCalcPerform.c index 0e5409768..151302887 100644 --- a/src/libCom/sCalcPerform.c +++ b/src/libCom/sCalcPerform.c @@ -244,7 +244,7 @@ static char *findConversionIndicator(char *s) return(retval); } -#if DEBUG +#if 0 /* Override standard EPICS expression evaluator (if we're loaded after it) */ epicsShareFunc long epicsShareAPI calcPerform(double *parg, double *presult, char *post) @@ -787,7 +787,7 @@ printf(") \n"); for (got_if=1; got_if>0 && *(post+1) != END_STACK; ++post) { switch(post[1]) { case LITERAL: post+=8; break; - case SLITERAL: post++; while (post[1]) post++; break; + case SLITERAL: post++; while (post[1]) post++; break; case COND_IF: got_if++; break; case COND_ELSE: got_if--; break; case FETCH: case SFETCH: post++; break; @@ -804,7 +804,7 @@ printf(") \n"); for (got_if=1; got_if>0 && *(post+1) != END_STACK; ++post) { switch(post[1]) { case LITERAL: post+=8; break; - case SLITERAL: post++; while (post[1]) post++; break; + case SLITERAL: post++; while (post[1]) post++; break; case COND_IF: got_if++; break; case COND_ELSE: got_if--; break; case FETCH: case SFETCH: post++; break; @@ -1242,7 +1242,6 @@ printf(") \n"); default: case '*': cleanup(top, ps1); return(-1); - break; case 'c': case 'd': case 'i': case 'o': case 'u': case 'x': case 'X': toDouble(ps1); @@ -1278,7 +1277,6 @@ printf(") \n"); default: case 'p': case 'w': case 'n': case '$': cleanup(top, ps1); return(-1); - break; case 'd': case 'i': if (s[-1] == 'h') { sscanf(ps->s, ps1->s, &h); @@ -1331,14 +1329,14 @@ printf(") \n"); toString(ps); k = strlen(ps->s); if (isDouble(ps1)) { - i = ps1->d; + i = (int)ps1->d; if (i < 0) i += k; } else { s = strstr(ps->s, ps1->s); i = s ? (s - ps->s) + strlen(ps1->s) : 0; } if (isDouble(ps2)) { - j = ps2->d; + j = (int)ps2->d; if (j < 0) j += k; } else { if (*(ps2->s)) { diff --git a/src/libCom/sCalcPostfix.c b/src/libCom/sCalcPostfix.c index 385c6f04d..8bbe1dad1 100644 --- a/src/libCom/sCalcPostfix.c +++ b/src/libCom/sCalcPostfix.c @@ -161,8 +161,7 @@ struct expression_element{ * then try to find BS therefore ABS must be first in this list */ static struct expression_element elements[] = { -/* -element i_s_p i_c_p type_element internal_rep */ +/* element i_s_p i_c_p type_element internal_rep */ "ABS", 7, 8, UNARY_OPERATOR, ABS_VAL, /* absolute value */ "NOT", 7, 8, UNARY_OPERATOR, UNARY_NEG, /* unary negate */ "-", 7, 8, MINUS_OPERATOR, UNARY_NEG, /* unary negate (or binary op) */ @@ -269,7 +268,7 @@ static struct expression_element fetch_string_element = { static int strncasecmp(char *s1, char *s2, size_t n) { short i; - for (i=0; i toupper((int)*s2)) return(1); if (toupper((int)*s1) < toupper((int)*s2)) return(-1); } @@ -342,7 +341,7 @@ register short *pno_bytes, *parg; } -#if DEBUG +#if 0 /* Override standard EPICS expression evaluator (if we're loaded after it). */ long epicsShareAPI postfix(char *pinfix,char *ppostfix,short *perror) { @@ -421,7 +420,7 @@ long epicsShareAPI sCalcPostfix(char *pinfix, char **pp_postfix, short *perror) *ppostfix++ = pelement->code; /* if this is a variable reference, append variable number */ - if ((pelement->code == FETCH) || (pelement->code == SFETCH)) { + if ((pelement->code == (char)FETCH) || (pelement->code == (char)SFETCH)) { *ppostfix++ = arg; }