diff --git a/src/RTEMS/base/Makefile b/src/RTEMS/base/Makefile index 95d5a06c1..98d24509f 100644 --- a/src/RTEMS/base/Makefile +++ b/src/RTEMS/base/Makefile @@ -16,7 +16,6 @@ SRCS += rtems_init.c SRCS += rtems_config.c SRCS += rtems_netconfig.c SRCS += rtems_util.c -SRCS += rtems_dummyreg.c SRCS += setBootConfigFromNVRAM.c SRCS += epicsRtemsInitHookPre.c SRCS += epicsRtemsInitHookPost.c diff --git a/src/RTEMS/base/rtems_dummyreg.c b/src/RTEMS/base/rtems_dummyreg.c deleted file mode 100644 index 3557ec0c9..000000000 --- a/src/RTEMS/base/rtems_dummyreg.c +++ /dev/null @@ -1,17 +0,0 @@ -/*************************************************************************\ -* Copyright (c) 2002 The University of Saskatchewan -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. -\*************************************************************************/ -/* - * Provide a dummy version of iocshRegister to be used with test applications. - */ - -#include - -void -iocshRegister(const iocshFuncDef *piocshFuncDef, iocshCallFunc func) -{ - printf ("No iocsh -- %s not registered\n", piocshFuncDef->name); -} diff --git a/src/db/dbLock.c b/src/db/dbLock.c index 65befe8d7..e1cea1581 100644 --- a/src/db/dbLock.c +++ b/src/db/dbLock.c @@ -236,6 +236,12 @@ void epicsShareAPI dbScanLock(dbCommon *precord) epicsMutexLockStatus status; epicsThreadId idSelf = epicsThreadGetIdSelf(); + /* + * If this assertion is failing it is likely because iocInit + * has not completed. It must complete before normal record + * processing is possible. Consider using an initHook to + * detect when this occurs. + */ assert(dbLockIsInitialized); while(1) { epicsMutexMustLock(lockSetModifyLock); diff --git a/src/db/dbNotify.c b/src/db/dbNotify.c index 621b7f448..7816788fe 100644 --- a/src/db/dbNotify.c +++ b/src/db/dbNotify.c @@ -46,8 +46,6 @@ #include "epicsTime.h" #include "cantProceed.h" -#define STATIC static - /*putNotify.state values */ typedef enum { putNotifyNotActive, @@ -86,15 +84,15 @@ typedef struct notifyGlobal { ELLLIST freeList; }notifyGlobal; -STATIC notifyGlobal *pnotifyGlobal = 0; +static notifyGlobal *pnotifyGlobal = 0; /*Local routines*/ -STATIC void putNotifyInit(putNotify *ppn); -STATIC void putNotifyCleanup(putNotify *ppn); -STATIC void restartCheck(putNotifyRecord *ppnr); -STATIC void callUser(dbCommon *precord,putNotify *ppn); -STATIC void notifyCallback(CALLBACK *pcallback); -STATIC void putNotifyCommon(putNotify *ppn,dbCommon *precord); +static void putNotifyInit(putNotify *ppn); +static void putNotifyCleanup(putNotify *ppn); +static void restartCheck(putNotifyRecord *ppnr); +static void callUser(dbCommon *precord,putNotify *ppn); +static void notifyCallback(CALLBACK *pcallback); +static void putNotifyCommon(putNotify *ppn,dbCommon *precord); #define ellSafeAdd(list,listnode) \ { \ @@ -110,7 +108,7 @@ STATIC void putNotifyCommon(putNotify *ppn,dbCommon *precord); (listnode)->isOnList=0; \ } -STATIC void putNotifyInit(putNotify *ppn) +static void putNotifyInit(putNotify *ppn) { putNotifyPvt *pputNotifyPvt; @@ -135,7 +133,7 @@ STATIC void putNotifyInit(putNotify *ppn) ppn->pputNotifyPvt = pputNotifyPvt; } -STATIC void putNotifyCleanup(putNotify *ppn) +static void putNotifyCleanup(putNotify *ppn) { putNotifyPvt *pputNotifyPvt = (putNotifyPvt *)ppn->pputNotifyPvt; @@ -144,7 +142,7 @@ STATIC void putNotifyCleanup(putNotify *ppn) ppn->pputNotifyPvt = 0; } -STATIC void restartCheck(putNotifyRecord *ppnr) +static void restartCheck(putNotifyRecord *ppnr) { dbCommon *precord = ppnr->precord; putNotify *pfirst; @@ -167,7 +165,7 @@ STATIC void restartCheck(putNotifyRecord *ppnr) callbackRequest(&pputNotifyPvt->callback); } -STATIC void callUser(dbCommon *precord,putNotify *ppn) +static void callUser(dbCommon *precord,putNotify *ppn) { putNotifyPvt *pputNotifyPvt = (putNotifyPvt *)ppn->pputNotifyPvt; @@ -198,7 +196,7 @@ STATIC void callUser(dbCommon *precord,putNotify *ppn) return; } -STATIC void putNotifyCommon(putNotify *ppn,dbCommon *precord) +static void putNotifyCommon(putNotify *ppn,dbCommon *precord) { long status=0; dbFldDes *pfldDes = ppn->paddr->pfldDes; @@ -245,7 +243,7 @@ STATIC void putNotifyCommon(putNotify *ppn,dbCommon *precord) callUser(precord,ppn); } -STATIC void notifyCallback(CALLBACK *pcallback) +static void notifyCallback(CALLBACK *pcallback) { putNotify *ppn=NULL; dbCommon *precord; @@ -459,7 +457,7 @@ typedef struct tpnInfo { putNotify *ppn; }tpnInfo; -STATIC void dbtpnCallback(putNotify *ppn) +static void dbtpnCallback(putNotify *ppn) { putNotifyStatus status = ppn->status; tpnInfo *ptpnInfo = (tpnInfo *)ppn->usrPvt; diff --git a/src/gdd/aitConvert.cc b/src/gdd/aitConvert.cc index b42bfa5f5..0bd508085 100644 --- a/src/gdd/aitConvert.cc +++ b/src/gdd/aitConvert.cc @@ -100,7 +100,7 @@ bool putDoubleToString ( if ( nChar < 1 ) { return false; } - assert ( nChar < strSize ); + assert ( size_t(nChar) < strSize ); #else int nChar = epicsSnprintf ( pString, strSize-1, "%g", in ); diff --git a/src/libCom/osi/epicsMutex.cpp b/src/libCom/osi/epicsMutex.cpp index 178fe2937..d2e421204 100644 --- a/src/libCom/osi/epicsMutex.cpp +++ b/src/libCom/osi/epicsMutex.cpp @@ -33,11 +33,9 @@ #include "epicsMutex.h" #include "epicsThread.h" -#define STATIC static - -STATIC int firstTime = 1; -STATIC ELLLIST mutexList; -STATIC ELLLIST freeList; +static int firstTime = 1; +static ELLLIST mutexList; +static ELLLIST freeList; struct epicsMutexParm { ELLNODE node; @@ -49,7 +47,7 @@ struct epicsMutexParm { int lineno; }; -STATIC epicsMutexOSD * epicsMutexGlobalLock; +static epicsMutexOSD * epicsMutexGlobalLock; // vxWorks 5.4 gcc fails during compile when I use std::exception diff --git a/src/libCom/timer/epicsTimer.cpp b/src/libCom/timer/epicsTimer.cpp index f063706bc..3f5e42fe5 100644 --- a/src/libCom/timer/epicsTimer.cpp +++ b/src/libCom/timer/epicsTimer.cpp @@ -18,6 +18,8 @@ #include #include +#include "epicsMath.h" + #define epicsExportSharedSymbols #include "epicsTimer.h" #include "epicsGuard.h" @@ -127,7 +129,7 @@ epicsShareFunc epicsTimerNotify::expireStatus::expireStatus throw std::logic_error ( "no timer restart was requested, but a delay was specified?" ); } - if ( this->delay < 0.0 ) { + if ( this->delay < 0.0 || !finite(this->delay) ) { throw std::logic_error ( "timer restart was requested, but a negative delay was specified?" ); } @@ -135,12 +137,12 @@ epicsShareFunc epicsTimerNotify::expireStatus::expireStatus epicsShareFunc bool epicsTimerNotify::expireStatus::restart () const { - return this->delay >= 0.0; + return this->delay >= 0.0 && finite(this->delay); } epicsShareFunc double epicsTimerNotify::expireStatus::expirationDelay () const { - if ( this->delay < 0.0 ) { + if ( this->delay < 0.0 || !finite(this->delay) ) { throw std::logic_error ( "no timer restart was requested, but you are asking for a restart delay?" ); } diff --git a/src/softIoc/Makefile b/src/softIoc/Makefile index 95ae80d33..001202793 100644 --- a/src/softIoc/Makefile +++ b/src/softIoc/Makefile @@ -30,5 +30,7 @@ DB += softIocExit.db include $(TOP)/configure/RULES +softMain$(OBJ) : $(COMMON_DIR)/epicsInstallDir.h + $(COMMON_DIR)/epicsInstallDir.h: $(INSTALL_BIN)/makeInstallDir.pl $(PERL) $< $(INSTALL_LOCATION) > $@