diff --git a/src/rec/recAi.c b/src/rec/recAi.c index b611cf911..90f005ea2 100644 --- a/src/rec/recAi.c +++ b/src/rec/recAi.c @@ -441,7 +441,7 @@ static void monitor(pai) { unsigned short monitor_mask; double delta; - short stat,sevr,nsta,nsev; + unsigned short stat,sevr,nsta,nsev; /* get previous stat and sevr and new stat and sevr*/ recGblResetSevr(pai,stat,sevr,nsta,nsev); diff --git a/src/rec/recAo.c b/src/rec/recAo.c index 101bfade9..a44148acb 100644 --- a/src/rec/recAo.c +++ b/src/rec/recAo.c @@ -522,7 +522,7 @@ static void monitor(pao) { unsigned short monitor_mask; double delta; - short stat,sevr,nsta,nsev; + unsigned short stat,sevr,nsta,nsev; /* get previous stat and sevr and new stat and sevr*/ recGblResetSevr(pao,stat,sevr,nsta,nsev); diff --git a/src/rec/recBi.c b/src/rec/recBi.c index 5b0b5f129..920498258 100644 --- a/src/rec/recBi.c +++ b/src/rec/recBi.c @@ -297,7 +297,7 @@ static void monitor(pbi) struct biRecord *pbi; { unsigned short monitor_mask; - short stat,sevr,nsta,nsev; + unsigned short stat,sevr,nsta,nsev; /* get previous stat and sevr and new stat and sevr*/ recGblResetSevr(pbi,stat,sevr,nsta,nsev); diff --git a/src/rec/recBo.c b/src/rec/recBo.c index 3138c86ce..d7aeeccaf 100644 --- a/src/rec/recBo.c +++ b/src/rec/recBo.c @@ -301,7 +301,7 @@ static long process(pbo) pcallback = (struct callback *)(pbo->rpvt); if(pcallback->wd_id==NULL) pcallback->wd_id = wdCreate(); callbackSetPriority(pbo->prio,pcallback); - wdStart(pcallback->wd_id,wait_time,callbackRequest,(int)pcallback); + wdStart(pcallback->wd_id,wait_time,(FUNCPTR)callbackRequest,(int)pcallback); } /* check event list */ monitor(pbo); @@ -392,7 +392,7 @@ static void monitor(pbo) struct boRecord *pbo; { unsigned short monitor_mask; - short stat,sevr,nsta,nsev; + unsigned short stat,sevr,nsta,nsev; /* get previous stat and sevr and new stat and sevr*/ recGblResetSevr(pbo,stat,sevr,nsta,nsev); diff --git a/src/rec/recCalc.c b/src/rec/recCalc.c index 1692efb19..31ee6bf20 100644 --- a/src/rec/recCalc.c +++ b/src/rec/recCalc.c @@ -365,7 +365,7 @@ static void monitor(pcalc) { unsigned short monitor_mask; double delta; - short stat,sevr,nsta,nsev; + unsigned short stat,sevr,nsta,nsev; double *pnew; double *pprev; int i; diff --git a/src/rec/recCompress.c b/src/rec/recCompress.c index 4fc039dc4..fbb53b0ef 100644 --- a/src/rec/recCompress.c +++ b/src/rec/recCompress.c @@ -324,7 +324,7 @@ static void monitor(pcompress) struct compressRecord *pcompress; { unsigned short monitor_mask; - short stat,sevr,nsta,nsev; + unsigned short stat,sevr,nsta,nsev; /* get previous stat and sevr and new stat and sevr*/ recGblResetSevr(pcompress,stat,sevr,nsta,nsev); diff --git a/src/rec/recEvent.c b/src/rec/recEvent.c index 5410b9516..7cad47ffa 100644 --- a/src/rec/recEvent.c +++ b/src/rec/recEvent.c @@ -194,7 +194,7 @@ static void monitor(pevent) struct eventRecord *pevent; { unsigned short monitor_mask; - short stat,sevr,nsta,nsev; + unsigned short stat,sevr,nsta,nsev; /* get previous stat and sevr and new stat and sevr*/ recGblResetSevr(pevent,stat,sevr,nsta,nsev); diff --git a/src/rec/recFanout.c b/src/rec/recFanout.c index db7e2c8fa..bd94365f9 100644 --- a/src/rec/recFanout.c +++ b/src/rec/recFanout.c @@ -130,7 +130,7 @@ static long init_record(pfanout,pass) static long process(pfanout) struct fanoutRecord *pfanout; { - short stat,sevr,nsta,nsev; + unsigned short stat,sevr,nsta,nsev; struct link *plink; diff --git a/src/rec/recHistogram.c b/src/rec/recHistogram.c index 8c8a8acfc..861b9da0d 100644 --- a/src/rec/recHistogram.c +++ b/src/rec/recHistogram.c @@ -317,7 +317,7 @@ static void monitor(phistogram) struct histogramRecord *phistogram; { unsigned short monitor_mask; - short stat,sevr,nsta,nsev; + unsigned short stat,sevr,nsta,nsev; /* get previous stat and sevr and new stat and sevr*/ stat=phistogram->stat; diff --git a/src/rec/recLongin.c b/src/rec/recLongin.c index b8d169e23..d874ce6ec 100644 --- a/src/rec/recLongin.c +++ b/src/rec/recLongin.c @@ -321,7 +321,7 @@ static void monitor(plongin) { unsigned short monitor_mask; long delta; - short stat,sevr,nsta,nsev; + unsigned short stat,sevr,nsta,nsev; /* get previous stat and sevr and new stat and sevr*/ recGblResetSevr(plongin,stat,sevr,nsta,nsev); diff --git a/src/rec/recLongout.c b/src/rec/recLongout.c index c16fbba9a..c539fbc5b 100644 --- a/src/rec/recLongout.c +++ b/src/rec/recLongout.c @@ -354,7 +354,7 @@ static void monitor(plongout) unsigned short monitor_mask; long delta; - short stat,sevr,nsta,nsev; + unsigned short stat,sevr,nsta,nsev; /* get previous stat and sevr and new stat and sevr*/ recGblResetSevr(plongout,stat,sevr,nsta,nsev); diff --git a/src/rec/recMbbi.c b/src/rec/recMbbi.c index f1a63ba57..53b7d23af 100644 --- a/src/rec/recMbbi.c +++ b/src/rec/recMbbi.c @@ -383,7 +383,7 @@ static void monitor(pmbbi) struct mbbiRecord *pmbbi; { unsigned short monitor_mask; - short stat,sevr,nsta,nsev; + unsigned short stat,sevr,nsta,nsev; /* get previous stat and sevr and new stat and sevr*/ recGblResetSevr(pmbbi,stat,sevr,nsta,nsev); diff --git a/src/rec/recMbbo.c b/src/rec/recMbbo.c index b0b63effc..abbc40f24 100644 --- a/src/rec/recMbbo.c +++ b/src/rec/recMbbo.c @@ -428,7 +428,7 @@ static void monitor(pmbbo) struct mbboRecord *pmbbo; { unsigned short monitor_mask; - short stat,sevr,nsta,nsev; + unsigned short stat,sevr,nsta,nsev; /* get previous stat and sevr and new stat and sevr*/ recGblResetSevr(pmbbo,stat,sevr,nsta,nsev); diff --git a/src/rec/recPermissive.c b/src/rec/recPermissive.c index 06fa73baf..20dc22348 100644 --- a/src/rec/recPermissive.c +++ b/src/rec/recPermissive.c @@ -118,7 +118,7 @@ static void monitor(ppermissive) struct permissiveRecord *ppermissive; { unsigned short monitor_mask; - short stat,sevr,nsta,nsev; + unsigned short stat,sevr,nsta,nsev; unsigned short val,oval,wflg,oflg; /* get previous stat and sevr and new stat and sevr*/ diff --git a/src/rec/recPid.c b/src/rec/recPid.c index 4bdd9cf6d..0727a0b6f 100644 --- a/src/rec/recPid.c +++ b/src/rec/recPid.c @@ -293,7 +293,7 @@ static void monitor(ppid) { unsigned short monitor_mask; float delta; - short stat,sevr,nsta,nsev; + unsigned short stat,sevr,nsta,nsev; /* get previous stat and sevr and new stat and sevr*/ recGblResetSevr(ppid,stat,sevr,nsta,nsev); diff --git a/src/rec/recPulseCounter.c b/src/rec/recPulseCounter.c index eb2cfa5d4..2cb61eb23 100644 --- a/src/rec/recPulseCounter.c +++ b/src/rec/recPulseCounter.c @@ -311,7 +311,7 @@ static long get_control_double(struct dbAddr *paddr, struct dbr_ctrlDouble *pcd) static void monitor(struct pulseCounterRecord *ppc) { unsigned short monitor_mask; - short stat,sevr,nsta,nsev; + unsigned short stat,sevr,nsta,nsev; /* get previous stat and sevr and new stat and sevr*/ recGblResetSevr(ppc,stat,sevr,nsta,nsev); diff --git a/src/rec/recPulseDelay.c b/src/rec/recPulseDelay.c index 9725a31ea..060063bd0 100644 --- a/src/rec/recPulseDelay.c +++ b/src/rec/recPulseDelay.c @@ -385,7 +385,7 @@ static void monitor(ppd) struct pulseDelayRecord *ppd; { unsigned short monitor_mask; - short stat,sevr,nsta,nsev; + unsigned short stat,sevr,nsta,nsev; /* get previous stat and sevr and new stat and sevr*/ recGblResetSevr(ppd,stat,sevr,nsta,nsev); diff --git a/src/rec/recPulseTrain.c b/src/rec/recPulseTrain.c index eed44d822..d1e7dae4b 100644 --- a/src/rec/recPulseTrain.c +++ b/src/rec/recPulseTrain.c @@ -279,7 +279,7 @@ static void monitor(ppt) struct pulseTrainRecord *ppt; { unsigned short monitor_mask; - short stat,sevr,nsta,nsev; + unsigned short stat,sevr,nsta,nsev; /* get previous stat and sevr and new stat and sevr*/ recGblResetSevr(ppt,stat,sevr,nsta,nsev); diff --git a/src/rec/recSel.c b/src/rec/recSel.c index 7775fcbd5..92d471742 100644 --- a/src/rec/recSel.c +++ b/src/rec/recSel.c @@ -348,7 +348,7 @@ static void monitor(psel) { unsigned short monitor_mask; double delta; - short stat,sevr,nsta,nsev; + unsigned short stat,sevr,nsta,nsev; double *pnew; double *pprev; int i; diff --git a/src/rec/recSeq.c b/src/rec/recSeq.c index d7f332dab..7b4782312 100644 --- a/src/rec/recSeq.c +++ b/src/rec/recSeq.c @@ -123,7 +123,7 @@ int pass; printf("init_record(%s) entered\n", pseq->name); /* Allocate a callback structure for use in processing */ - pseq->dpvt = malloc(sizeof(struct callbackSeq)); + pseq->dpvt = (void *)malloc(sizeof(struct callbackSeq)); ((struct callbackSeq *) (pseq->dpvt))->callBack.callback = processCallback; ((struct callbackSeq *) (pseq->dpvt))->callBack.user = (void *) pseq; @@ -226,7 +226,7 @@ struct seqRecord *pseq; } if (pseq->selm == REC_SEQ_SELM_SPECIFIC) { - if(pseq->seln<0 || pseq->seln>10) + if(pseq->seln>10) { /* Invalid selection number */ recGblSetSevr(pseq,SOFT_ALARM,INVALID_ALARM); return(asyncFinish(pseq)); @@ -310,7 +310,7 @@ struct seqRecord *pseq; { /* Use the watch-dog as a delay mechanism */ wdDelay = pcb->plinks[pcb->index]->dly * sysClkRateGet(); - wdStart(pcb->wd_id, wdDelay, watchDog, (int)(&(pcb->callBack))); + wdStart(pcb->wd_id, wdDelay, (FUNCPTR)watchDog, (int)(&(pcb->callBack))); } else { @@ -332,7 +332,7 @@ static long asyncFinish(pseq) struct seqRecord *pseq; { - short stat, sevr, nsta, nsev; + unsigned short stat, sevr, nsta, nsev; if (seqRecDebug > 5) printf("asyncFinish(%s) completing processing\n", pseq->name); diff --git a/src/rec/recState.c b/src/rec/recState.c index 5c5399e58..58404a658 100644 --- a/src/rec/recState.c +++ b/src/rec/recState.c @@ -121,7 +121,7 @@ static void monitor(pstate) struct stateRecord *pstate; { unsigned short monitor_mask; - short stat,sevr,nsta,nsev; + unsigned short stat,sevr,nsta,nsev; /* get previous stat and sevr and new stat and sevr*/ recGblResetSevr(pstate,stat,sevr,nsta,nsev); diff --git a/src/rec/recSteppermotor.c b/src/rec/recSteppermotor.c index 5c568af11..52b815652 100644 --- a/src/rec/recSteppermotor.c +++ b/src/rec/recSteppermotor.c @@ -395,7 +395,7 @@ static void monitor(psm) { unsigned short monitor_mask; float delta; - short stat,sevr,nsta,nsev; + unsigned short stat,sevr,nsta,nsev; /* get previous stat and sevr and new stat and sevr*/ recGblResetSevr(psm,stat,sevr,nsta,nsev); @@ -447,7 +447,7 @@ struct motor_data *psm_data; struct steppermotorRecord *psm; { struct smdset *pdset = (struct smdset *)(psm->dset); - short stat,sevr,nsta,nsev; + unsigned short stat,sevr,nsta,nsev; int intAccept=interruptAccept; short post_events; double temp; diff --git a/src/rec/recStringin.c b/src/rec/recStringin.c index 157c44981..1efcfaaa2 100644 --- a/src/rec/recStringin.c +++ b/src/rec/recStringin.c @@ -210,7 +210,7 @@ static void monitor(pstringin) struct stringinRecord *pstringin; { unsigned short monitor_mask; - short stat,sevr,nsta,nsev; + unsigned short stat,sevr,nsta,nsev; /* get previous stat and sevr and new stat and sevr*/ recGblResetSevr(pstringin,stat,sevr,nsta,nsev); diff --git a/src/rec/recStringout.c b/src/rec/recStringout.c index 20ddca80c..21b6b5b83 100644 --- a/src/rec/recStringout.c +++ b/src/rec/recStringout.c @@ -249,7 +249,7 @@ static void monitor(pstringout) struct stringoutRecord *pstringout; { unsigned short monitor_mask; - short stat,sevr,nsta,nsev; + unsigned short stat,sevr,nsta,nsev; /* get previous stat and sevr and new stat and sevr*/ recGblResetSevr(pstringout,stat,sevr,nsta,nsev); diff --git a/src/rec/recSub.c b/src/rec/recSub.c index 2dc1f7050..aaa04fd1b 100644 --- a/src/rec/recSub.c +++ b/src/rec/recSub.c @@ -350,7 +350,7 @@ static void monitor(psub) { unsigned short monitor_mask; double delta; - short stat,sevr,nsta,nsev; + unsigned short stat,sevr,nsta,nsev; double *pnew; double *pprev; int i; diff --git a/src/rec/recTimer.c b/src/rec/recTimer.c index 61402d292..be0db0f67 100644 --- a/src/rec/recTimer.c +++ b/src/rec/recTimer.c @@ -112,10 +112,10 @@ struct dset devTmAt5Vxi={4,NULL,NULL,NULL,NULL}; extern int post_event(); -void monitor(); -void read_timer(); -void convert_timer(); -void write_timer(); +static void monitor(); +static void read_timer(); +static void convert_timer(); +static void write_timer(); static long init_record(ptimer,pass) struct timerRecord *ptimer; @@ -176,7 +176,7 @@ static void monitor(ptimer) struct timerRecord *ptimer; { unsigned short monitor_mask; - short stat,sevr,nsta,nsev; + unsigned short stat,sevr,nsta,nsev; /* get previous stat and sevr and new stat and sevr*/ recGblResetSevr(ptimer,stat,sevr,nsta,nsev); diff --git a/src/rec/recWaveform.c b/src/rec/recWaveform.c index 8625355f6..570c37380 100644 --- a/src/rec/recWaveform.c +++ b/src/rec/recWaveform.c @@ -147,7 +147,7 @@ static long init_record(pwf,pass) if(pwf->ftvl == 0) { pwf->bptr = (char *)calloc(pwf->nelm,MAX_STRING_SIZE); } else { - if(pwf->ftvl<0|| pwf->ftvl>DBF_ENUM) pwf->ftvl=2; + if(pwf->ftvl>DBF_ENUM) pwf->ftvl=2; pwf->bptr = (char *)calloc(pwf->nelm,sizeofTypes[pwf->ftvl]); } pwf->nord = 0; @@ -343,7 +343,7 @@ static void monitor(pwf) struct waveformRecord *pwf; { unsigned short monitor_mask; - short stat,sevr,nsta,nsev; + unsigned short stat,sevr,nsta,nsev; /* get previous stat and sevr and new stat and sevr*/ recGblResetSevr(pwf,stat,sevr,nsta,nsev);