diff --git a/src/ioc/db/dbScan.c b/src/ioc/db/dbScan.c index 7d8895091..a81cc4d66 100644 --- a/src/ioc/db/dbScan.c +++ b/src/ioc/db/dbScan.c @@ -600,7 +600,7 @@ static void initPeriodic(void) ppsl->scan_list.lock = epicsMutexMustCreate(); ellInit(&ppsl->scan_list.list); - epicsScanDouble(pmenu->papChoiceValue[i + SCAN_1ST_PERIODIC], + (void) epicsScanDouble(pmenu->papChoiceValue[i + SCAN_1ST_PERIODIC], &ppsl->period); ppsl->scanCtl = ctlPause; ppsl->loopEvent = epicsEventMustCreate(epicsEventEmpty); diff --git a/src/ioc/dbStatic/dbLexRoutines.c b/src/ioc/dbStatic/dbLexRoutines.c index a3cf78308..67bc8af17 100644 --- a/src/ioc/dbStatic/dbLexRoutines.c +++ b/src/ioc/dbStatic/dbLexRoutines.c @@ -862,11 +862,11 @@ static void dbBreakBody(void) char *str; str = (char *)popFirstTemp(); - epicsScanDouble(str, &paBrkInt[i].raw); + (void) epicsScanDouble(str, &paBrkInt[i].raw); free(str); str = (char *)popFirstTemp(); - epicsScanDouble(str, &paBrkInt[i].eng); + (void) epicsScanDouble(str, &paBrkInt[i].eng); free(str); } /* Compute slopes */ diff --git a/src/ioc/dbStatic/dbStaticLib.c b/src/ioc/dbStatic/dbStaticLib.c index 0bcf825fb..ce27803a5 100644 --- a/src/ioc/dbStatic/dbStaticLib.c +++ b/src/ioc/dbStatic/dbStaticLib.c @@ -229,7 +229,6 @@ static void finishOutstream(FILE *stream) static long setLinkType(DBENTRY *pdbentry) { DBENTRY dbEntry; - dbFldDes *pflddes; dbRecordType *precordType; devSup *pdevSup; DBLINK *plink; @@ -273,7 +272,6 @@ static long setLinkType(DBENTRY *pdbentry) link_type = pdevSup->link_type; } - pflddes = pdbentry->pflddes; plink = (DBLINK *)pdbentry->pfield; if (plink->type == link_type) goto done; @@ -1397,7 +1395,6 @@ long epicsShareAPI dbNextField(DBENTRY *pdbentry,int dctonly) dbRecordNode *precnode = pdbentry->precnode; dbFldDes *pflddes; short indfield = pdbentry->indfield; - long status; if(!precordType) return(S_dbLib_recordTypeNotFound); indfield++; @@ -1417,7 +1414,7 @@ long epicsShareAPI dbNextField(DBENTRY *pdbentry,int dctonly) pdbentry->pflddes = pflddes; pdbentry->indfield = indfield; if(precnode) { - status = dbGetFieldAddress(pdbentry); + dbGetFieldAddress(pdbentry); }else { pdbentry->pfield = NULL; } @@ -1889,7 +1886,6 @@ long epicsShareAPI dbFindFieldPart(DBENTRY *pdbentry,const char **ppname) dbRecordType *precordType = pdbentry->precordType; dbRecordNode *precnode = pdbentry->precnode; const char *pname = *ppname; - char *precord; short top, bottom, test; char **papsortFldName; short *sortFldInd; @@ -1898,7 +1894,6 @@ long epicsShareAPI dbFindFieldPart(DBENTRY *pdbentry,const char **ppname) if (!precordType) return S_dbLib_recordTypeNotFound; if (!precnode) return S_dbLib_recNotFound; - precord = precnode->precord; papsortFldName = precordType->papsortFldName; sortFldInd = precordType->sortFldInd; @@ -1974,12 +1969,10 @@ char * epicsShareAPI dbGetString(DBENTRY *pdbentry) dbFldDes *pflddes = pdbentry->pflddes; void *pfield = pdbentry->pfield; char *message; - unsigned char cvttype; DBLINK *plink; message = getpMessage(pdbentry); if(!pflddes) {strcpy(message,"fldDes not found"); return(message);} - cvttype = pflddes->base; switch (pflddes->field_type) { case DBF_STRING: if(!pfield) {strcpy(message,"Field not found"); return(message);} diff --git a/src/libCom/as/asLibRoutines.c b/src/libCom/as/asLibRoutines.c index a92aa19d2..8c07a82ba 100644 --- a/src/libCom/as/asLibRoutines.c +++ b/src/libCom/as/asLibRoutines.c @@ -1271,7 +1271,6 @@ static long asAsgRuleUagAdd(ASGRULE *pasgrule,const char *name) ASGUAG *pasguag; UAG *puag; ASBASE *pasbase = (ASBASE *)pasbasenew; - long status; if(!pasgrule) return(0); puag = (UAG *)ellFirst(&pasbase->uagList); @@ -1280,7 +1279,6 @@ static long asAsgRuleUagAdd(ASGRULE *pasgrule,const char *name) puag = (UAG *)ellNext((ELLNODE *)puag); } if(!puag){ - status = S_asLib_noUag; errlogPrintf("No User Access Group named '%s' defined\n", name); return(S_asLib_noUag); } @@ -1295,7 +1293,6 @@ static long asAsgRuleHagAdd(ASGRULE *pasgrule,const char *name) ASGHAG *pasghag; HAG *phag; ASBASE *pasbase = (ASBASE *)pasbasenew; - long status; if(!pasgrule) return(0); phag = (HAG *)ellFirst(&pasbase->hagList); @@ -1304,7 +1301,6 @@ static long asAsgRuleHagAdd(ASGRULE *pasgrule,const char *name) phag = (HAG *)ellNext((ELLNODE *)phag); } if(!phag){ - status = S_asLib_noHag; errlogPrintf("No Host Access Group named '%s' defined\n", name); return(S_asLib_noHag); } diff --git a/src/libCom/flex/ccl.c b/src/libCom/flex/ccl.c index 0fc82c9c1..36841d9b1 100644 --- a/src/libCom/flex/ccl.c +++ b/src/libCom/flex/ccl.c @@ -34,11 +34,6 @@ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#ifndef lint -static char rcsid[] = - "@(#) $Revision-Id$ (LBL)"; -#endif - #include "flexdef.h" /* ccladd - add a single character to a ccl diff --git a/src/libCom/flex/dfa.c b/src/libCom/flex/dfa.c index cda0dc894..559a12fd1 100644 --- a/src/libCom/flex/dfa.c +++ b/src/libCom/flex/dfa.c @@ -34,11 +34,6 @@ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#ifndef lint -static char rcsid[] = - "@(#) $Revision-Id$ (LBL)"; -#endif - #include "flexdef.h" diff --git a/src/libCom/flex/ecs.c b/src/libCom/flex/ecs.c index 37d938832..416ea601a 100644 --- a/src/libCom/flex/ecs.c +++ b/src/libCom/flex/ecs.c @@ -34,11 +34,6 @@ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#ifndef lint -static char rcsid[] = - "@(#) $Revision-Id$ (LBL)"; -#endif - #include "flexdef.h" /* ccl2ecl - convert character classes to set of equivalence classes diff --git a/src/libCom/flex/flex.skel.static b/src/libCom/flex/flex.skel.static index 827bc8ff8..e4fa7deb1 100644 --- a/src/libCom/flex/flex.skel.static +++ b/src/libCom/flex/flex.skel.static @@ -223,11 +223,13 @@ static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file ); #define yy_new_buffer yy_create_buffer +#ifdef yyneed_input #ifdef __cplusplus static int yyinput ( void ); #else static int input ( void ); #endif +#endif YY_DECL { @@ -565,6 +567,7 @@ static void yyunput( YY_CHAR c, register YY_CHAR *yy_bp ) } +#ifdef yyneed_input #ifdef __cplusplus static int yyinput( void ) #else @@ -631,6 +634,7 @@ static int input( void ) return ( c ); } +#endif /* yyneed_input */ /* jbk added static in front of func */ diff --git a/src/libCom/flex/gen.c b/src/libCom/flex/gen.c index 575d98829..aad884074 100644 --- a/src/libCom/flex/gen.c +++ b/src/libCom/flex/gen.c @@ -34,11 +34,6 @@ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#ifndef lint -static char rcsid[] = - "@(#) $Revision-Id$ (LBL)"; -#endif - #include "flexdef.h" diff --git a/src/libCom/flex/misc.c b/src/libCom/flex/misc.c index 96dbbaacc..a0b18a70a 100644 --- a/src/libCom/flex/misc.c +++ b/src/libCom/flex/misc.c @@ -34,11 +34,6 @@ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#ifndef lint -static char rcsid[] = - "@(#) $Revision-Id$ (LBL)"; -#endif - #include #include "flexdef.h" #include diff --git a/src/libCom/flex/nfa.c b/src/libCom/flex/nfa.c index cd04ade81..b57c6d646 100644 --- a/src/libCom/flex/nfa.c +++ b/src/libCom/flex/nfa.c @@ -34,11 +34,6 @@ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#ifndef lint -static char rcsid[] = - "@(#) $Revision-Id$ (LBL)"; -#endif - #include "flexdef.h" diff --git a/src/libCom/flex/parse.y b/src/libCom/flex/parse.y index e65ecdc63..dff931578 100644 --- a/src/libCom/flex/parse.y +++ b/src/libCom/flex/parse.y @@ -30,11 +30,6 @@ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#ifndef lint -static char rcsid[] = - "@(#) $Revision-Id$ (LBL)"; -#endif - #include "flexdef.h" int pat, scnum, eps, headcnt, trailcnt, anyccl, lastchar, i, actvp, rulelen; diff --git a/src/libCom/flex/scan.c b/src/libCom/flex/scan.c index d38fce46e..1c34ee1e9 100644 --- a/src/libCom/flex/scan.c +++ b/src/libCom/flex/scan.c @@ -911,9 +911,6 @@ static const short int yy_chk[1612] = 390 } ; -static yy_state_type yy_last_accepting_state; -static YY_CHAR *yy_last_accepting_cpos; - static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr; static YY_CHAR *yy_full_match; static int yy_lp; @@ -961,12 +958,6 @@ void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file ); #define yy_new_buffer yy_create_buffer -#ifdef __cplusplus -static int yyinput ( void ); -#else -static int input ( void ); -#endif - YY_DECL { yy_state_type yy_current_state; @@ -975,7 +966,7 @@ YY_DECL static int bracelevel, didadef; - int i, indented_code, checking_used, new_xlation; + int i, indented_code = false, checking_used = false, new_xlation = false; int doing_codeblock = false; Char nmdef[MAXLINE], myesc(); @@ -2123,74 +2114,6 @@ static void yyunput( YY_CHAR c, YY_CHAR *yy_bp ) } -#ifdef __cplusplus -static int yyinput() -#else -static int input(void) -#endif - - { - int c; - YY_CHAR *yy_cp = yy_c_buf_p; - - *yy_cp = yy_hold_char; - - if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) - /* this was really a NUL */ - *yy_c_buf_p = '\0'; - - else - { /* need more input */ - yytext = yy_c_buf_p; - ++yy_c_buf_p; - - switch ( yy_get_next_buffer() ) - { - case EOB_ACT_END_OF_FILE: - { - if ( yywrap() ) - { - yy_c_buf_p = yytext + YY_MORE_ADJ; - return ( EOF ); - } - - YY_NEW_FILE; - -#ifdef __cplusplus - return ( yyinput() ); -#else - return ( input() ); -#endif - } - break; - - case EOB_ACT_CONTINUE_SCAN: - yy_c_buf_p = yytext + YY_MORE_ADJ; - break; - - case EOB_ACT_LAST_MATCH: -#ifdef __cplusplus - YY_FATAL_ERROR( "unexpected last match in yyinput()" ); -#else - YY_FATAL_ERROR( "unexpected last match in input()" ); -#endif - } - } - } - - c = *yy_c_buf_p; - yy_hold_char = *++yy_c_buf_p; - - return ( c ); - } - - void yyrestart( FILE *input_file ) { yy_init_buffer( yy_current_buffer, input_file ); diff --git a/src/libCom/flex/scan.l.DISTRIB b/src/libCom/flex/scan.l.DISTRIB index a6075aa79..a566181d3 100644 --- a/src/libCom/flex/scan.l.DISTRIB +++ b/src/libCom/flex/scan.l.DISTRIB @@ -75,7 +75,7 @@ ESCSEQ \\([^\r\n]|[0-9]{1,3}|x[0-9a-f]{1,2}) %% static int bracelevel, didadef; - int i, indented_code, checking_used, new_xlation; + int i, indented_code = false, checking_used = false, new_xlation = false; int doing_codeblock = false; Char nmdef[MAXLINE], myesc(); diff --git a/src/libCom/flex/sym.c b/src/libCom/flex/sym.c index 943dafdac..45e1c5409 100644 --- a/src/libCom/flex/sym.c +++ b/src/libCom/flex/sym.c @@ -34,11 +34,6 @@ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#ifndef lint -static char rcsid[] = - "@(#) $Revision-Id$ (LBL)"; -#endif - #include "flexdef.h" diff --git a/src/libCom/flex/tblcmp.c b/src/libCom/flex/tblcmp.c index 31fd979b6..3e4c4744b 100644 --- a/src/libCom/flex/tblcmp.c +++ b/src/libCom/flex/tblcmp.c @@ -34,11 +34,6 @@ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#ifndef lint -static char rcsid[] = - "@(#) $Revision-Id$ (LBL)"; -#endif - #include "flexdef.h" diff --git a/src/libCom/test/epicsMessageQueueTest.cpp b/src/libCom/test/epicsMessageQueueTest.cpp index f9c1d98fa..ba226382a 100644 --- a/src/libCom/test/epicsMessageQueueTest.cpp +++ b/src/libCom/test/epicsMessageQueueTest.cpp @@ -134,14 +134,12 @@ extern "C" void messageQueueTest(void *parm) char cbuf[80]; int len; int pass; - int used; int want; epicsMessageQueue *q1 = new epicsMessageQueue(4, 20); testDiag("Simple single-thread tests:"); i = 0; - used = 0; testOk1(q1->pending() == 0); while (q1->trySend((void *)msg1, i ) == 0) { i++; @@ -182,7 +180,6 @@ extern "C" void messageQueueTest(void *parm) testDiag("Test sender timeout:"); i = 0; - used = 0; testOk1(q1->pending() == 0); while (q1->send((void *)msg1, i, 1.0 ) == 0) { i++; diff --git a/src/libCom/test/epicsThreadPerform.cpp b/src/libCom/test/epicsThreadPerform.cpp index e01fc9430..c8fd34515 100644 --- a/src/libCom/test/epicsThreadPerform.cpp +++ b/src/libCom/test/epicsThreadPerform.cpp @@ -174,17 +174,16 @@ static epicsThreadPrivate < bool > priv; static inline void callItTenTimes () { - bool *pFlag; - pFlag = priv.get (); - pFlag = priv.get (); - pFlag = priv.get (); - pFlag = priv.get (); - pFlag = priv.get (); - pFlag = priv.get (); - pFlag = priv.get (); - pFlag = priv.get (); - pFlag = priv.get (); - pFlag = priv.get (); + (void) priv.get (); + (void) priv.get (); + (void) priv.get (); + (void) priv.get (); + (void) priv.get (); + (void) priv.get (); + (void) priv.get (); + (void) priv.get (); + (void) priv.get (); + (void) priv.get (); } static inline void callItTenTimesSquared ()