Clean up some compiler warnings from gcc 4.6
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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);}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -34,11 +34,6 @@
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char rcsid[] =
|
||||
"@(#) $Revision-Id$ (LBL)";
|
||||
#endif
|
||||
|
||||
#include "flexdef.h"
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -34,11 +34,6 @@
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char rcsid[] =
|
||||
"@(#) $Revision-Id$ (LBL)";
|
||||
#endif
|
||||
|
||||
#include "flexdef.h"
|
||||
|
||||
|
||||
|
||||
@@ -34,11 +34,6 @@
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char rcsid[] =
|
||||
"@(#) $Revision-Id$ (LBL)";
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
#include "flexdef.h"
|
||||
#include <assert.h>
|
||||
|
||||
@@ -34,11 +34,6 @@
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char rcsid[] =
|
||||
"@(#) $Revision-Id$ (LBL)";
|
||||
#endif
|
||||
|
||||
#include "flexdef.h"
|
||||
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -34,11 +34,6 @@
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char rcsid[] =
|
||||
"@(#) $Revision-Id$ (LBL)";
|
||||
#endif
|
||||
|
||||
#include "flexdef.h"
|
||||
|
||||
|
||||
|
||||
@@ -34,11 +34,6 @@
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char rcsid[] =
|
||||
"@(#) $Revision-Id$ (LBL)";
|
||||
#endif
|
||||
|
||||
#include "flexdef.h"
|
||||
|
||||
|
||||
|
||||
@@ -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++;
|
||||
|
||||
@@ -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 ()
|
||||
|
||||
Reference in New Issue
Block a user