Fixed various compiler warnings.
This commit is contained in:
+8
-2
@@ -30,7 +30,13 @@ gdd_NEWDEL_STAT(gdd)
|
||||
epicsMutex * gdd::pGlobalMutex = 0;
|
||||
epicsThreadOnceId gdd::staticInitOnce = EPICS_THREAD_ONCE_INIT;
|
||||
|
||||
void gdd::staticInit ( void * )
|
||||
// Can't pass C++ linkage static member function gdd::staticInit
|
||||
// into epicsThreadOnce(); we need a C linkage function for that:
|
||||
extern "C" {
|
||||
static void gdd_staticInit(void *) { gdd::staticInit(); }
|
||||
}
|
||||
|
||||
void gdd::staticInit (void)
|
||||
{
|
||||
gdd::pGlobalMutex = new epicsMutex;
|
||||
assert ( gdd::pGlobalMutex );
|
||||
@@ -95,7 +101,7 @@ gdd::gdd(int app, aitEnum prim, int dimen, aitUint32* val)
|
||||
|
||||
void gdd::init(int app, aitEnum prim, int dimen)
|
||||
{
|
||||
epicsThreadOnce ( & gdd::staticInitOnce, gdd::staticInit, 0 );
|
||||
epicsThreadOnce ( & gdd::staticInitOnce, gdd_staticInit, 0 );
|
||||
|
||||
setApplType(app);
|
||||
//
|
||||
|
||||
+6
-1
@@ -56,6 +56,10 @@ class gddScalar;
|
||||
struct epicsTimeStamp;
|
||||
struct timespec;
|
||||
|
||||
extern "C" {
|
||||
static void gdd_staticInit(void *);
|
||||
}
|
||||
|
||||
// Not Complete in this prototype:
|
||||
// - Read only DD.
|
||||
// - Small array management using free lists
|
||||
@@ -503,7 +507,8 @@ private:
|
||||
|
||||
static epicsMutex * pGlobalMutex;
|
||||
static epicsThreadOnceId staticInitOnce;
|
||||
static void staticInit ( void * );
|
||||
static void staticInit (void);
|
||||
friend void gdd_staticInit(void *);
|
||||
|
||||
const gdd* indexDD (aitIndex index) const;
|
||||
};
|
||||
|
||||
@@ -38,11 +38,14 @@ private:
|
||||
static gddCleanUp * pBufferCleanUpGDD = NULL;
|
||||
|
||||
static epicsThreadOnceId gddCleanupOnce = EPICS_THREAD_ONCE_INIT;
|
||||
|
||||
extern "C" {
|
||||
static void gddCleanupInit ( void * )
|
||||
{
|
||||
pBufferCleanUpGDD = new gddCleanUp;
|
||||
assert ( pBufferCleanUpGDD );
|
||||
}
|
||||
}
|
||||
|
||||
void gddGlobalCleanupAdd ( void * pBuf )
|
||||
{
|
||||
|
||||
+4
-2
@@ -62,7 +62,7 @@ void gddGlobalCleanupAdd ( void * pBuf );
|
||||
void operator delete(void*); \
|
||||
char* newdel_next(void) { char** x=(char**)&(fld); return *x; } \
|
||||
void newdel_setNext(char* n) { char** x=(char**)&(fld); *x=n; } \
|
||||
static void gddNewDelInit ( void * ) { pNewdel_lock = new epicsMutex; }
|
||||
static void gddNewDelInit (void) { pNewdel_lock = new epicsMutex; } \
|
||||
|
||||
|
||||
// declaration of the static variable for the free list
|
||||
@@ -87,10 +87,12 @@ void gddGlobalCleanupAdd ( void * pBuf );
|
||||
|
||||
// code for the new function
|
||||
#define gdd_NEWDEL_NEW(clas) \
|
||||
extern "C" { void clas##_gddNewDelInit ( void * ) { \
|
||||
clas::gddNewDelInit(); } } \
|
||||
void* clas::operator new(size_t size) { \
|
||||
int tot; \
|
||||
clas *nn,*dn; \
|
||||
epicsThreadOnce ( &once, gddNewDelInit, 0 ); \
|
||||
epicsThreadOnce ( &once, clas##_gddNewDelInit, 0 ); \
|
||||
if(!clas::newdel_freelist) { \
|
||||
tot=gdd_CHUNK_NUM; \
|
||||
nn=(clas*)malloc(gdd_CHUNK(clas)); \
|
||||
|
||||
+4
-4
@@ -93,7 +93,7 @@ public:
|
||||
gddStatus destroy(void* thing_to_remove);
|
||||
virtual void run(void* thing_to_remove);
|
||||
|
||||
gdd_NEWDEL_FUNC(arg); // for using generic new and remove
|
||||
gdd_NEWDEL_FUNC(arg) // for using generic new and remove
|
||||
protected:
|
||||
aitUint16 ref_cnt;
|
||||
void* arg;
|
||||
@@ -114,7 +114,7 @@ class epicsShareClass gddBounds1D
|
||||
public:
|
||||
gddBounds1D(void) { }
|
||||
gddBounds* boundArray(void);
|
||||
gdd_NEWDEL_FUNC(b[0]); // required for using generic new and remove
|
||||
gdd_NEWDEL_FUNC(b[0]) // required for using generic new and remove
|
||||
private:
|
||||
gddBounds b[1];
|
||||
gdd_NEWDEL_DATA // required for using generic new/remove
|
||||
@@ -126,7 +126,7 @@ class epicsShareClass gddBounds2D
|
||||
public:
|
||||
gddBounds2D(void) { }
|
||||
gddBounds* boundArray(void);
|
||||
gdd_NEWDEL_FUNC(b[0]); // required for using generic new and remove
|
||||
gdd_NEWDEL_FUNC(b[0]) // required for using generic new and remove
|
||||
private:
|
||||
gddBounds b[2];
|
||||
gdd_NEWDEL_DATA // required for using generic new/remove
|
||||
@@ -138,7 +138,7 @@ class epicsShareClass gddBounds3D
|
||||
public:
|
||||
gddBounds3D(void) { }
|
||||
gddBounds* boundArray(void);
|
||||
gdd_NEWDEL_FUNC(b[0]); // for using generic new and remove
|
||||
gdd_NEWDEL_FUNC(b[0]) // for using generic new and remove
|
||||
private:
|
||||
gddBounds b[3];
|
||||
gdd_NEWDEL_DATA // required for using generic new/remove
|
||||
|
||||
@@ -187,6 +187,7 @@ epicsReadlineEnd (void *context)
|
||||
|
||||
#if defined(vxWorks)
|
||||
|
||||
#include <string.h>
|
||||
#include <ledLib.h>
|
||||
#define LEDLIB_LINESIZE 1000
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <sntpcLib.h>
|
||||
#include <time.h>
|
||||
#include <errno.h>
|
||||
#include <envLib.h>
|
||||
|
||||
#include "epicsTypes.h"
|
||||
#include "cantProceed.h"
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
#include <hostLib.h>
|
||||
#include <inetLib.h>
|
||||
|
||||
#include "errlog.h"
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "osiSock.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user