diff --git a/src/ioc/dbStatic/dbLexRoutines.c b/src/ioc/dbStatic/dbLexRoutines.c index 970bb9715..2ba4c92e8 100644 --- a/src/ioc/dbStatic/dbLexRoutines.c +++ b/src/ioc/dbStatic/dbLexRoutines.c @@ -315,9 +315,9 @@ static int db_yyinput(char *buf, int max_size) fgetsRtn = fgets(mac_input_buffer,MY_BUFFER_SIZE, pinputFileNow->fp); if(fgetsRtn) { - n = macExpandString(macHandle,mac_input_buffer, + int exp = macExpandString(macHandle,mac_input_buffer, my_buffer,MY_BUFFER_SIZE); - if(n<0) { + if(exp < 0) { errPrintf(0,__FILE__, __LINE__, "macExpandString failed for file %s", pinputFileNow->filename); diff --git a/src/ioc/dbStatic/dbStaticLib.c b/src/ioc/dbStatic/dbStaticLib.c index 43b7d88d2..636fc59fa 100644 --- a/src/ioc/dbStatic/dbStaticLib.c +++ b/src/ioc/dbStatic/dbStaticLib.c @@ -2093,7 +2093,6 @@ long dbPutString(DBENTRY *pdbentry,const char *pstring) DBLINK *plink; char string[80]; char *pstr = string; - size_t ind; if (!pfield) return S_dbLib_fieldNotFound; @@ -2128,11 +2127,14 @@ long dbPutString(DBENTRY *pdbentry,const char *pstring) /* Strip leading blanks and tabs */ while (*pstr && (*pstr == ' ' || *pstr == '\t')) pstr++; /* Strip trailing blanks and tabs */ - if (pstr) - for (ind = strlen(pstr) - 1; ind >= 0; ind--) { + if (pstr) { + int ind; + + for (ind = (int) strlen(pstr) - 1; ind >= 0; ind--) { if (pstr[ind] != ' ' && pstr[ind] != '\t') break; pstr[ind] = '\0'; } + } if (!pstr || !*pstr) { if (plink->type == PV_LINK) dbCvtLinkToConstant(pdbentry); if (plink->type != CONSTANT) return S_dbLib_badField;