fixed gnu warnings
This commit is contained in:
5
src/libCom/env/envSubr.c
vendored
5
src/libCom/env/envSubr.c
vendored
@@ -75,11 +75,16 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "shareLib.h"
|
||||
|
||||
epicsShareFunc int putenv ( const char *envstring ); /* not in ANSI C */
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "errMdef.h"
|
||||
#include "envDefs.h"
|
||||
#include "epicsAssert.h"
|
||||
|
||||
|
||||
|
||||
/*+/subr**********************************************************************
|
||||
* NAME envGetConfigParamPtr - returns a pointer to the configuration
|
||||
|
||||
@@ -141,8 +141,8 @@ private:
|
||||
|
||||
osiTimerForOldFdmgr::osiTimerForOldFdmgr (oldFdmgr &fdmgrIn,
|
||||
double delayIn, pCallBackFDMgr pFuncIn, void *pParamIn) :
|
||||
fdmgr (fdmgrIn), osiTimer (delayIn, fdmgrIn.timerQueueRef ()),
|
||||
pFunc (pFuncIn), pParam(pParamIn)
|
||||
osiTimer (delayIn, fdmgrIn.timerQueueRef ()),
|
||||
fdmgr (fdmgrIn), pFunc (pFuncIn), pParam(pParamIn)
|
||||
{
|
||||
if (pFuncIn==NULL) {
|
||||
# ifdef noExceptionsFromCXX
|
||||
@@ -279,6 +279,7 @@ extern "C" epicsShareFunc int epicsShareAPI fdmgr_add_callback (
|
||||
oldFdmgr *pfdm = static_cast <oldFdmgr *> (pfdctx);
|
||||
fdRegForOldFdmgr *pfdrbc;
|
||||
bool onceOnly = (fdi==fdi_write);
|
||||
unsigned fdiType;
|
||||
|
||||
if (pfdm==NULL) {
|
||||
return -1;
|
||||
@@ -288,15 +289,21 @@ extern "C" epicsShareFunc int epicsShareAPI fdmgr_add_callback (
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (fdi<0 || fdi>=fdiToFdRegTypeNElements) {
|
||||
if (fdi<0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
fdiType = (unsigned) fdi;
|
||||
|
||||
if (fdiType>=fdiToFdRegTypeNElements) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
# ifdef noExceptionsFromCXX
|
||||
pfdrbc = new fdRegForOldFdmgr (fd, fdiToFdRegType[fdi], onceOnly, *pfdm, pFunc, pParam);
|
||||
pfdrbc = new fdRegForOldFdmgr (fd, fdiToFdRegType[fdiType], onceOnly, *pfdm, pFunc, pParam);
|
||||
# else
|
||||
try {
|
||||
pfdrbc = new fdRegForOldFdmgr (fd, fdiToFdRegType[fdi], onceOnly, *pfdm, pFunc, pParam);
|
||||
pfdrbc = new fdRegForOldFdmgr (fd, fdiToFdRegType[fdiType], onceOnly, *pfdm, pFunc, pParam);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
|
||||
@@ -319,7 +319,7 @@ void osiTimer::unlock () const
|
||||
//
|
||||
osiTimerQueue::osiTimerQueue (unsigned managerThreadPriority) :
|
||||
osiThread ("osiTimerQueue", threadGetStackSize (threadStackMedium), managerThreadPriority),
|
||||
inProcess (false), pExpireTmr (0), terminateFlag (false)
|
||||
pExpireTmr (0), inProcess (false), terminateFlag (false)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -167,7 +167,7 @@ class osiTimerQueue : public osiThread {
|
||||
friend class osiTimer;
|
||||
public:
|
||||
osiTimerQueue (unsigned managerThreadPriority = threadPriorityMin);
|
||||
~osiTimerQueue();
|
||||
virtual ~osiTimerQueue();
|
||||
double delayToFirstExpire () const; // returns seconds
|
||||
void process ();
|
||||
void show (unsigned level) const;
|
||||
|
||||
Reference in New Issue
Block a user