Clean up warnings from gcc 4.6.3
This commit is contained in:
@@ -71,9 +71,8 @@ static long read_event(eventRecord *prec)
|
||||
long status;
|
||||
char newEvent[MAX_STRING_SIZE];
|
||||
|
||||
if (prec->inp.type != CONSTANT)
|
||||
{
|
||||
status = dbGetLinkValue(&prec->inp, DBR_STRING, newEvent, 0, 0);
|
||||
if (prec->inp.type != CONSTANT) {
|
||||
status = dbGetLink(&prec->inp, DBR_STRING, newEvent, 0, 0);
|
||||
if (status) return status;
|
||||
if (strcmp(newEvent, prec->val) != 0) {
|
||||
strcpy(prec->val, newEvent);
|
||||
|
||||
@@ -52,8 +52,6 @@ epicsExportAddress(dset,devHistogramSoft);
|
||||
|
||||
static long init_record(histogramRecord *prec)
|
||||
{
|
||||
long status = 0;
|
||||
|
||||
/* histogram.svl must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK*/
|
||||
switch (prec->svl.type) {
|
||||
case (CONSTANT) :
|
||||
@@ -69,13 +67,11 @@ static long init_record(histogramRecord *prec)
|
||||
"devHistogramSoft (init_record) Illegal SVL field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
return(status);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static long read_histogram(histogramRecord *prec)
|
||||
{
|
||||
long status;
|
||||
|
||||
status = dbGetLink(&prec->svl,DBR_DOUBLE, &prec->sgnl,0,0);
|
||||
return(0); /*add count*/
|
||||
dbGetLink(&prec->svl, DBR_DOUBLE, &prec->sgnl, 0, 0);
|
||||
return 0; /*add count*/
|
||||
}
|
||||
|
||||
@@ -48,13 +48,11 @@ epicsExportAddress(dset,devLoSoft);
|
||||
|
||||
static long init_record(longoutRecord *prec)
|
||||
{
|
||||
return(0);
|
||||
return 0;
|
||||
} /* end init_record() */
|
||||
|
||||
static long write_longout(longoutRecord *prec)
|
||||
{
|
||||
long status;
|
||||
|
||||
status = dbPutLink(&prec->out,DBR_LONG, &prec->val,1);
|
||||
return(0);
|
||||
dbPutLink(&prec->out,DBR_LONG, &prec->val,1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -59,8 +59,6 @@ static long init_record(mbboDirectRecord *prec)
|
||||
|
||||
static long write_mbbo(mbboDirectRecord *prec)
|
||||
{
|
||||
long status;
|
||||
|
||||
status = dbPutLink(&prec->out,DBR_USHORT,&prec->val,1);
|
||||
return(0);
|
||||
dbPutLink(&prec->out,DBR_USHORT,&prec->val,1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -62,10 +62,9 @@ static long init_record(mbboDirectRecord *prec)
|
||||
|
||||
static long write_mbbo(mbboDirectRecord *prec)
|
||||
{
|
||||
long status;
|
||||
unsigned long data;
|
||||
|
||||
data = prec->rval & prec->mask;
|
||||
status = dbPutLink(&prec->out,DBR_LONG, &data,1);
|
||||
return(0);
|
||||
dbPutLink(&prec->out,DBR_LONG, &data,1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -49,19 +49,13 @@ epicsExportAddress(dset,devMbboSoft);
|
||||
|
||||
static long init_record(mbboRecord *prec)
|
||||
{
|
||||
|
||||
long status=0;
|
||||
|
||||
/*dont convert*/
|
||||
status=2;
|
||||
return status;
|
||||
return 2;
|
||||
|
||||
} /* end init_record() */
|
||||
|
||||
static long write_mbbo(mbboRecord *prec)
|
||||
{
|
||||
long status;
|
||||
|
||||
status = dbPutLink(&prec->out,DBR_USHORT, &prec->val,1);
|
||||
return(0);
|
||||
dbPutLink(&prec->out,DBR_USHORT, &prec->val,1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -48,24 +48,19 @@ epicsExportAddress(dset,devMbboSoftRaw);
|
||||
|
||||
static long init_record(mbboRecord *prec)
|
||||
{
|
||||
|
||||
long status;
|
||||
|
||||
/*to preserve old functionality*/
|
||||
if(prec->nobt == 0) prec->mask = 0xffffffff;
|
||||
if (prec->nobt == 0) prec->mask = 0xffffffff;
|
||||
prec->mask <<= prec->shft;
|
||||
/*dont convert*/
|
||||
status = 2;
|
||||
return status;
|
||||
return 2;
|
||||
|
||||
} /* end init_record() */
|
||||
|
||||
static long write_mbbo(mbboRecord *prec)
|
||||
{
|
||||
long status;
|
||||
unsigned long data;
|
||||
|
||||
data = prec->rval & prec->mask;
|
||||
status = dbPutLink(&prec->out,DBR_LONG, &data,1);
|
||||
return(0);
|
||||
dbPutLink(&prec->out,DBR_LONG, &data,1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -93,7 +93,6 @@ static db_field_log* filter(void* pvt, dbChannel *chan, db_field_log *pfl) {
|
||||
long end = my->end;
|
||||
long nTarget = 0;
|
||||
long offset = 0;
|
||||
long status;
|
||||
long nSource = chan->addr.no_elements;
|
||||
|
||||
/* Only array data */
|
||||
@@ -108,7 +107,7 @@ static db_field_log* filter(void* pvt, dbChannel *chan, db_field_log *pfl) {
|
||||
prset->get_array_info) {
|
||||
prec = dbChannelRecord(chan);
|
||||
dbScanLock(prec);
|
||||
status = prset->get_array_info(&chan->addr, &nSource, &offset);
|
||||
prset->get_array_info(&chan->addr, &nSource, &offset);
|
||||
nTarget = wrapArrayIndices(&start, my->incr, &end, nSource);
|
||||
pfl->type = dbfl_type_ref;
|
||||
pfl->stat = prec->stat;
|
||||
|
||||
@@ -89,7 +89,6 @@ static int fl_equals_array(short type, const db_field_log *pfl1, void *p2) {
|
||||
|
||||
static void createAndOpen(const char *chan, const char *json, const char *type, dbChannel**pch, short no) {
|
||||
ELLNODE *node;
|
||||
chFilter *filter;
|
||||
char name[80];
|
||||
|
||||
strncpy(name, chan, sizeof(name)-1);
|
||||
@@ -101,11 +100,11 @@ static void createAndOpen(const char *chan, const char *json, const char *type,
|
||||
testOk(!(dbChannelOpen(*pch)), "dbChannel with plugin arr opened");
|
||||
|
||||
node = ellFirst(&(*pch)->pre_chain);
|
||||
filter = CONTAINER(node, chFilter, pre_node);
|
||||
(void) CONTAINER(node, chFilter, pre_node);
|
||||
testOk((ellCount(&(*pch)->pre_chain) == 0), "arr has no filter in pre chain");
|
||||
|
||||
node = ellFirst(&(*pch)->post_chain);
|
||||
filter = CONTAINER(node, chFilter, post_node);
|
||||
(void) CONTAINER(node, chFilter, post_node);
|
||||
testOk((ellCount(&(*pch)->post_chain) == no),
|
||||
"arr has %d filter(s) in post chain", no);
|
||||
}
|
||||
@@ -120,7 +119,7 @@ static void testHead (const char *title, const char *typ = "") {
|
||||
#define TEST1(Size, Offset, Incr, Text) \
|
||||
testDiag("Offset: %d (%s)", Offset, Text); \
|
||||
off = Offset; \
|
||||
status = dbPutField(&offaddr, DBR_LONG, &off, 1); \
|
||||
(void) dbPutField(&offaddr, DBR_LONG, &off, 1); \
|
||||
pfl = db_create_read_log(pch); \
|
||||
testOk(pfl->type == dbfl_type_rec, "original field log has type rec"); \
|
||||
pfl2 = dbChannelRunPostChain(pch, pfl); \
|
||||
@@ -132,7 +131,6 @@ static void testHead (const char *title, const char *typ = "") {
|
||||
static void check(short dbr_type) {
|
||||
dbChannel *pch;
|
||||
db_field_log *pfl, *pfl2;
|
||||
int status;
|
||||
dbAddr valaddr;
|
||||
dbAddr offaddr;
|
||||
const char *offname = NULL, *valname = NULL, *typname = NULL;
|
||||
@@ -173,10 +171,10 @@ static void check(short dbr_type) {
|
||||
testDiag("Invalid data type %d", dbr_type);
|
||||
}
|
||||
|
||||
status = dbNameToAddr(offname, &offaddr);
|
||||
(void) dbNameToAddr(offname, &offaddr);
|
||||
|
||||
status = dbNameToAddr(valname, &valaddr);
|
||||
status = dbPutField(&valaddr, DBR_LONG, ar, 10);
|
||||
(void) dbNameToAddr(valname, &valaddr);
|
||||
(void) dbPutField(&valaddr, DBR_LONG, ar, 10);
|
||||
|
||||
/* Default: should not change anything */
|
||||
|
||||
|
||||
@@ -576,8 +576,6 @@ static void checkAlarms(calcoutRecord *prec)
|
||||
|
||||
static void execOutput(calcoutRecord *prec)
|
||||
{
|
||||
long status;
|
||||
|
||||
/* Determine output data */
|
||||
switch(prec->dopt) {
|
||||
case calcoutDOPT_Use_VAL:
|
||||
@@ -598,12 +596,12 @@ static void execOutput(calcoutRecord *prec)
|
||||
/* Check to see what to do if INVALID */
|
||||
if (prec->nsev < INVALID_ALARM ) {
|
||||
/* Output the value */
|
||||
status = writeValue(prec);
|
||||
writeValue(prec);
|
||||
/* post output event if set */
|
||||
if (prec->epvt) postEvent(prec->epvt);
|
||||
} else switch (prec->ivoa) {
|
||||
case menuIvoaContinue_normally:
|
||||
status = writeValue(prec);
|
||||
writeValue(prec);
|
||||
/* post output event if set */
|
||||
if (prec->epvt) postEvent(prec->epvt);
|
||||
break;
|
||||
@@ -611,12 +609,11 @@ static void execOutput(calcoutRecord *prec)
|
||||
break;
|
||||
case menuIvoaSet_output_to_IVOV:
|
||||
prec->oval = prec->ivov;
|
||||
status = writeValue(prec);
|
||||
writeValue(prec);
|
||||
/* post output event if set */
|
||||
if (prec->epvt) postEvent(prec->epvt);
|
||||
break;
|
||||
default:
|
||||
status = -1;
|
||||
recGblRecordError(S_db_badField, (void *)prec,
|
||||
"calcout:process Illegal IVOA field");
|
||||
}
|
||||
|
||||
@@ -88,7 +88,6 @@ static long process(fanoutRecord *prec)
|
||||
struct link *plink;
|
||||
unsigned short state;
|
||||
short i;
|
||||
unsigned short monitor_mask;
|
||||
|
||||
prec->pact = TRUE;
|
||||
|
||||
@@ -134,7 +133,7 @@ static long process(fanoutRecord *prec)
|
||||
recGblGetTimeStamp(prec);
|
||||
/* check monitors*/
|
||||
/* get previous stat and sevr and new stat and sevr*/
|
||||
monitor_mask = recGblResetAlarms(prec);
|
||||
recGblResetAlarms(prec);
|
||||
/* process the forward scan link record */
|
||||
recGblFwdLink(prec);
|
||||
prec->pact=FALSE;
|
||||
|
||||
@@ -91,7 +91,6 @@ static void monitor(subRecord *);
|
||||
static long init_record(subRecord *prec, int pass)
|
||||
{
|
||||
SUBFUNCPTR psubroutine;
|
||||
long status = 0;
|
||||
struct link *plink;
|
||||
int i;
|
||||
double *pvalue;
|
||||
@@ -114,7 +113,7 @@ static long init_record(subRecord *prec, int pass)
|
||||
return S_db_BadSub;
|
||||
}
|
||||
/* invoke the initialization subroutine */
|
||||
status = (*psubroutine)(prec);
|
||||
(*psubroutine)(prec);
|
||||
}
|
||||
|
||||
if (prec->snam[0] == 0) {
|
||||
|
||||
@@ -133,7 +133,6 @@ static long init_record(waveformRecord *prec, int pass)
|
||||
static long process(waveformRecord *prec)
|
||||
{
|
||||
struct wfdset *pdset = (struct wfdset *)(prec->dset);
|
||||
long status;
|
||||
unsigned char pact=prec->pact;
|
||||
|
||||
if ((pdset==NULL) || (pdset->read_wf==NULL)) {
|
||||
@@ -144,7 +143,7 @@ static long process(waveformRecord *prec)
|
||||
|
||||
if (pact && prec->busy) return 0;
|
||||
|
||||
status=readValue(prec); /* read the new value */
|
||||
readValue(prec); /* read the new value */
|
||||
if (!pact && prec->pact) return 0;
|
||||
|
||||
prec->pact = TRUE;
|
||||
|
||||
Reference in New Issue
Block a user