diff --git a/src/ca/CASG.cpp b/src/ca/CASG.cpp index aaa9b15e8..1b0a65879 100644 --- a/src/ca/CASG.cpp +++ b/src/ca/CASG.cpp @@ -35,11 +35,20 @@ #include "autoPtrDestroy.h" #include "cac.h" +#if defined ( _MSC_VER ) +# pragma warning ( push ) +# pragma warning ( disable: 4660 ) +#endif + template class tsSLNode < CASG>; template class tsFreeList < CASG, 128, 0 >; template class tsFreeList < syncGroupWriteNotify, 128, 0 >; template class tsFreeList < syncGroupReadNotify, 128, 0 >; +#if defined ( _MSC_VER ) +# pragma warning ( pop ) +#endif + tsFreeList < struct CASG, 128 > CASG::freeList; epicsMutex CASG::freeListMutex; diff --git a/src/ca/bhe.cpp b/src/ca/bhe.cpp index a18dca00d..5c2f2c894 100644 --- a/src/ca/bhe.cpp +++ b/src/ca/bhe.cpp @@ -19,8 +19,17 @@ #include "bhe.h" #undef epicsExportSharedSymbols +#if defined ( _MSC_VER ) +# pragma warning ( push ) +# pragma warning ( disable: 4660 ) +#endif + template class tsFreeList < class bhe, 1024 >; +#if defined ( _MSC_VER ) +# pragma warning ( pop ) +#endif + tsFreeList < class bhe, 1024 > bhe::freeList; epicsMutex bhe::freeListMutex; diff --git a/src/ca/bhe.h b/src/ca/bhe.h index 681d1378a..1f679e7f5 100644 --- a/src/ca/bhe.h +++ b/src/ca/bhe.h @@ -27,6 +27,7 @@ #include "tsDLList.h" #include "tsFreeList.h" #include "epicsTime.h" +#include "epicsMutex.h" #ifdef bhehEpicsExportSharedSymbols # define epicsExportSharedSymbols @@ -40,7 +41,7 @@ class bhe : public tsSLNode < bhe >, public inetAddrID { public: epicsShareFunc bhe ( const epicsTime &initialTimeStamp, const inetAddrID &addr ); epicsShareFunc void destroy (); - epicsShareFunc bool updatePeriod ( const epicsTime & programBeginTime, + epicsShareFunc bool updatePeriod ( const epicsTime & programBeginTime, const epicsTime & currentTime ); epicsShareFunc double period () const; epicsShareFunc void show ( unsigned level) const; diff --git a/src/ca/cac.cpp b/src/ca/cac.cpp index 4f10c5185..fcec6eecf 100644 --- a/src/ca/cac.cpp +++ b/src/ca/cac.cpp @@ -36,6 +36,11 @@ #include "net_convert.h" #undef epicsExportSharedSymbols +#if defined ( _MSC_VER ) +# pragma warning ( push ) +# pragma warning ( disable: 4660 ) +#endif + template class resTable < nciu, chronIntId >; template class chronIntIdResTable < nciu >; template class tsSLNode < tcpiiu >; @@ -50,6 +55,10 @@ template class tsFreeList < netReadNotifyIO, 1024, 0 >; template class tsFreeList < netWriteNotifyIO, 1024, 0 >; template class tsFreeList < netSubscription, 1024, 0 >; +#if defined ( _MSC_VER ) +# pragma warning ( pop ) +#endif + // TCP response dispatch table const cac::pProtoStubTCP cac::tcpJumpTableCAC [] = { diff --git a/src/ca/comBuf.cpp b/src/ca/comBuf.cpp index 67e6ae057..33a516952 100644 --- a/src/ca/comBuf.cpp +++ b/src/ca/comBuf.cpp @@ -19,8 +19,17 @@ #include "iocinf.h" #include "comBuf.h" +#if defined ( _MSC_VER ) +# pragma warning ( push ) +# pragma warning ( disable: 4660 ) +#endif + template class tsFreeList < class comBuf, 0x20 >; +#if defined ( _MSC_VER ) +# pragma warning ( pop ) +#endif + tsFreeList < class comBuf, 0x20 > comBuf::freeList; epicsMutex comBuf::freeListMutex; diff --git a/src/ca/getCallback.cpp b/src/ca/getCallback.cpp index 6847ce69b..d2653a72b 100644 --- a/src/ca/getCallback.cpp +++ b/src/ca/getCallback.cpp @@ -18,8 +18,17 @@ #include "iocinf.h" #include "oldAccess.h" +#if defined ( _MSC_VER ) +# pragma warning ( push ) +# pragma warning ( disable: 4660 ) +#endif + template class tsFreeList < class getCallback, 1024 >; +#if defined ( _MSC_VER ) +# pragma warning ( pop ) +#endif + tsFreeList < class getCallback, 1024 > getCallback::freeList; epicsMutex getCallback::freeListMutex; diff --git a/src/ca/getCopy.cpp b/src/ca/getCopy.cpp index 77521c32c..3f6bcd90b 100644 --- a/src/ca/getCopy.cpp +++ b/src/ca/getCopy.cpp @@ -21,8 +21,17 @@ #include "oldAccess.h" #include "cac.h" +#if defined ( _MSC_VER ) +# pragma warning ( push ) +# pragma warning ( disable: 4660 ) +#endif + template class tsFreeList < class getCopy, 1024 >; +#if defined ( _MSC_VER ) +# pragma warning ( pop ) +#endif + tsFreeList < class getCopy, 1024 > getCopy::freeList; epicsMutex getCopy::freeListMutex; diff --git a/src/ca/hostNameCache.cpp b/src/ca/hostNameCache.cpp index 123fad3b7..a841f6933 100644 --- a/src/ca/hostNameCache.cpp +++ b/src/ca/hostNameCache.cpp @@ -21,8 +21,17 @@ #include "iocinf.h" #include "hostNameCache.h" +#if defined ( _MSC_VER ) +# pragma warning ( push ) +# pragma warning ( disable: 4660 ) +#endif + template class tsFreeList < hostNameCache, 16 >; +#if defined ( _MSC_VER ) +# pragma warning ( pop ) +#endif + tsFreeList < hostNameCache, 16 > hostNameCache::freeList; epicsMutex hostNameCache::freeListMutex; diff --git a/src/ca/msgForMultiplyDefinedPV.cpp b/src/ca/msgForMultiplyDefinedPV.cpp index 206b25d41..4ededc3f8 100644 --- a/src/ca/msgForMultiplyDefinedPV.cpp +++ b/src/ca/msgForMultiplyDefinedPV.cpp @@ -25,8 +25,17 @@ #include "caerr.h" // for ECA_DBLCHNL #undef epicsExportSharedSymbols +#if defined ( _MSC_VER ) +# pragma warning ( push ) +# pragma warning ( disable: 4660 ) +#endif + template class tsFreeList < class msgForMultiplyDefinedPV, 16 >; +#if defined ( _MSC_VER ) +# pragma warning ( pop ) +#endif + tsFreeList < class msgForMultiplyDefinedPV, 16 > msgForMultiplyDefinedPV::freeList; epicsMutex msgForMultiplyDefinedPV::freeListMutex; diff --git a/src/ca/nciu.cpp b/src/ca/nciu.cpp index 9029e0d7a..db2b18fbb 100644 --- a/src/ca/nciu.cpp +++ b/src/ca/nciu.cpp @@ -32,9 +32,18 @@ #include "db_access.h" // for INVALID_DB_REQ #undef epicsExportSharedSymbols +#if defined ( _MSC_VER ) +# pragma warning ( push ) +# pragma warning ( disable: 4660 ) +#endif + template class tsFreeList < nciu, 1024, 0 >; template class tsSLNode < baseNMIU >; +#if defined ( _MSC_VER ) +# pragma warning ( pop ) +#endif + tsFreeList < class nciu, 1024 > nciu::freeList; epicsMutex nciu::freeListMutex; diff --git a/src/ca/netIO.h b/src/ca/netIO.h index d5fdd0582..6cc1a29bc 100644 --- a/src/ca/netIO.h +++ b/src/ca/netIO.h @@ -145,15 +145,6 @@ inline class nciu & baseNMIU::channel () const return this->chan; } -inline netSubscription * netSubscription::factory ( - tsFreeList < class netSubscription, 1024 > &freeList, - nciu &chan, unsigned type, arrayElementCount count, - unsigned mask, cacStateNotify ¬ify ) -{ - return new ( freeList ) netSubscription ( chan, type, - count, mask, notify ); -} - inline void * netSubscription::operator new ( size_t size, tsFreeList < class netSubscription, 1024 > &freeList ) { @@ -171,8 +162,18 @@ inline void netSubscription::operator delete ( void *pCadaver, size_t size, { freeList.release ( pCadaver, size ); } +#error #endif +inline netSubscription * netSubscription::factory ( + tsFreeList < class netSubscription, 1024 > &freeList, + nciu &chan, unsigned type, arrayElementCount count, + unsigned mask, cacStateNotify ¬ify ) +{ + return new ( freeList ) netSubscription ( chan, type, + count, mask, notify ); +} + inline arrayElementCount netSubscription::getCount () const { arrayElementCount nativeCount = this->chan.nativeElementCount (); diff --git a/src/ca/netiiu.cpp b/src/ca/netiiu.cpp index 28d36e69d..3c211a5bf 100644 --- a/src/ca/netiiu.cpp +++ b/src/ca/netiiu.cpp @@ -19,8 +19,17 @@ #include "cac.h" #include "netiiu.h" +#if defined ( _MSC_VER ) +# pragma warning ( push ) +# pragma warning ( disable: 4660 ) +#endif + template class tsSLNode < nciu >; +#if defined ( _MSC_VER ) +# pragma warning ( pop ) +#endif + netiiu::netiiu ( cac *pClientCtxIn ) : pClientCtx ( pClientCtxIn ) { } diff --git a/src/ca/oldChannelNotify.cpp b/src/ca/oldChannelNotify.cpp index 25be4ec54..4c853b3e2 100644 --- a/src/ca/oldChannelNotify.cpp +++ b/src/ca/oldChannelNotify.cpp @@ -21,8 +21,17 @@ #include "oldAccess.h" #include "cac.h" +#if defined ( _MSC_VER ) +# pragma warning ( push ) +# pragma warning ( disable: 4660 ) +#endif + template class tsFreeList < struct oldChannelNotify, 1024 >; +#if defined ( _MSC_VER ) +# pragma warning ( pop ) +#endif + tsFreeList < struct oldChannelNotify, 1024 > oldChannelNotify::freeList; epicsMutex oldChannelNotify::freeListMutex; diff --git a/src/ca/oldSubscription.cpp b/src/ca/oldSubscription.cpp index bd44e7408..daf854564 100644 --- a/src/ca/oldSubscription.cpp +++ b/src/ca/oldSubscription.cpp @@ -13,8 +13,17 @@ #include "iocinf.h" #include "oldAccess.h" +#if defined ( _MSC_VER ) +# pragma warning ( push ) +# pragma warning ( disable: 4660 ) +#endif + template class tsFreeList < struct oldSubscription, 1024 >; +#if defined ( _MSC_VER ) +# pragma warning ( pop ) +#endif + tsFreeList < struct oldSubscription, 1024 > oldSubscription::freeList; epicsMutex oldSubscription::freeListMutex; diff --git a/src/ca/putCallback.cpp b/src/ca/putCallback.cpp index 7ce46cf02..28118d239 100644 --- a/src/ca/putCallback.cpp +++ b/src/ca/putCallback.cpp @@ -18,8 +18,17 @@ #include "iocinf.h" #include "oldAccess.h" +#if defined ( _MSC_VER ) +# pragma warning ( push ) +# pragma warning ( disable: 4660 ) +#endif + template class tsFreeList < class putCallback, 1024 >; +#if defined ( _MSC_VER ) +# pragma warning ( pop ) +#endif + tsFreeList < class putCallback, 1024 > putCallback::freeList; epicsMutex putCallback::freeListMutex; diff --git a/src/ca/repeater.cpp b/src/ca/repeater.cpp index 83ea5ee8b..fd522d1e4 100644 --- a/src/ca/repeater.cpp +++ b/src/ca/repeater.cpp @@ -99,7 +99,18 @@ private: * per machine so we dont care about reentrancy */ static tsDLList < repeaterClient > client_list; + +#if defined ( _MSC_VER ) +# pragma warning ( push ) +# pragma warning ( disable: 4660 ) +#endif + template class tsFreeList < repeaterClient, 0x20 >; + +#if defined ( _MSC_VER ) +# pragma warning ( pop ) +#endif + tsFreeList < repeaterClient, 0x20 > repeaterClient::freeList; epicsMutex repeaterClient::freeListMutex; diff --git a/src/cas/example/directoryService/directoryServer.cc b/src/cas/example/directoryService/directoryServer.cc index d63b95a74..c1a6dfa7d 100644 --- a/src/cas/example/directoryService/directoryServer.cc +++ b/src/cas/example/directoryService/directoryServer.cc @@ -6,9 +6,18 @@ #include "directoryServer.h" #include "tsMinMax.h" +#if defined ( _MSC_VER ) +# pragma warning ( push ) +# pragma warning ( disable: 4660 ) +#endif + template class tsSLNode; template class resTable; +#if defined ( _MSC_VER ) +# pragma warning ( pop ) +#endif + const pvInfo *pvInfo::pFirst; // diff --git a/src/cas/example/simple/exPV.cc b/src/cas/example/simple/exPV.cc index 220043dc6..86d10e4b7 100644 --- a/src/cas/example/simple/exPV.cc +++ b/src/cas/example/simple/exPV.cc @@ -4,10 +4,19 @@ #include "exServer.h" #include "gddApps.h" +#if defined ( _MSC_VER ) +# pragma warning ( push ) +# pragma warning ( disable: 4660 ) +#endif + template class gddAppFuncTable < exPV >; template class tsSLNode < pvEntry >; template class resTable < pvEntry, stringId >; +#if defined ( _MSC_VER ) +# pragma warning ( pop ) +#endif + // // static data for exPV // diff --git a/src/cas/example/simple/exServer.cc b/src/cas/example/simple/exServer.cc index aaae6e932..28ff02df9 100644 --- a/src/cas/example/simple/exServer.cc +++ b/src/cas/example/simple/exServer.cc @@ -8,8 +8,17 @@ // #include "exServer.h" +#if defined ( _MSC_VER ) +# pragma warning ( push ) +# pragma warning ( disable: 4660 ) +#endif + template class tsSLNode < exPV >; +#if defined ( _MSC_VER ) +# pragma warning ( pop ) +#endif + // // static list of pre-created PVs // diff --git a/src/cas/generic/caServerI.cc b/src/cas/generic/caServerI.cc index a4b38ab5e..37409d8e6 100644 --- a/src/cas/generic/caServerI.cc +++ b/src/cas/generic/caServerI.cc @@ -37,12 +37,21 @@ #include "server.h" #include "casCtxIL.h" // casCtx in line func +#if defined ( _MSC_VER ) +# pragma warning ( push ) +# pragma warning ( disable: 4660 ) +#endif + template class tsSLNode < casPVI >; template class tsSLNode < casRes >; template class resTable < casRes, chronIntId >; template class resTable < casEventMaskEntry, stringId >; template class chronIntIdResTable < casRes >; +#if defined ( _MSC_VER ) +# pragma warning ( pop ) +#endif + // // the maximum beacon period if EPICS_CA_BEACON_PERIOD isnt available // diff --git a/src/cas/generic/casEventMask.cc b/src/cas/generic/casEventMask.cc index ed52200c6..4358f4f65 100644 --- a/src/cas/generic/casEventMask.cc +++ b/src/cas/generic/casEventMask.cc @@ -34,9 +34,18 @@ #include "server.h" +#if defined ( _MSC_VER ) +# pragma warning ( push ) +# pragma warning ( disable: 4660 ) +#endif + template class tsSLNode < casEventMaskEntry >; template class resTable < casEventMaskEntry, stringId >; +#if defined ( _MSC_VER ) +# pragma warning ( pop ) +#endif + #ifdef TEST main () { diff --git a/src/db/dbChannelIO.cpp b/src/db/dbChannelIO.cpp index d49c1a6f4..27aa12486 100644 --- a/src/db/dbChannelIO.cpp +++ b/src/db/dbChannelIO.cpp @@ -29,8 +29,17 @@ #include "dbChannelIOIL.h" #include "dbNotifyBlockerIL.h" +#if defined ( _MSC_VER ) +# pragma warning ( push ) +# pragma warning ( disable: 4660 ) +#endif + template class tsFreeList < dbChannelIO >; +#if defined ( _MSC_VER ) +# pragma warning ( pop ) +#endif + tsFreeList < dbChannelIO > dbChannelIO::freeList; epicsMutex dbChannelIO::freeListMutex; unsigned dbChannelIO::nextIdForIO; diff --git a/src/db/dbPutNotifyBlocker.cpp b/src/db/dbPutNotifyBlocker.cpp index 7458ccc4a..2bc497194 100644 --- a/src/db/dbPutNotifyBlocker.cpp +++ b/src/db/dbPutNotifyBlocker.cpp @@ -37,8 +37,17 @@ #define S_db_Blocked (M_dbAccess|39) #define S_db_Pending (M_dbAccess|37) +#if defined ( _MSC_VER ) +# pragma warning ( push ) +# pragma warning ( disable: 4660 ) +#endif + template class tsFreeList < dbPutNotifyBlocker, 1024, 0 >; +#if defined ( _MSC_VER ) +# pragma warning ( pop ) +#endif + tsFreeList < dbPutNotifyBlocker, 1024, 0 > dbPutNotifyBlocker::freeList; epicsMutex dbPutNotifyBlocker::freeListMutex; diff --git a/src/db/dbServiceIO.cpp b/src/db/dbServiceIO.cpp index 3ef4ce678..557ef7ad5 100644 --- a/src/db/dbServiceIO.cpp +++ b/src/db/dbServiceIO.cpp @@ -33,10 +33,19 @@ #include "dbChannelIOIL.h" #include "dbNotifyBlockerIL.h" +#if defined ( _MSC_VER ) +# pragma warning ( push ) +# pragma warning ( disable: 4660 ) +#endif + template class chronIntIdResTable < dbBaseIO >; template class tsSLNode < dbBaseIO >; template class resTable < dbBaseIO, chronIntId >; +#if defined ( _MSC_VER ) +# pragma warning ( pop ) +#endif + class dbServiceIOLoadTimeInit { public: dbServiceIOLoadTimeInit (); diff --git a/src/db/dbSubscriptionIO.cpp b/src/db/dbSubscriptionIO.cpp index fd39b0a1d..a16397c3b 100644 --- a/src/db/dbSubscriptionIO.cpp +++ b/src/db/dbSubscriptionIO.cpp @@ -30,7 +30,17 @@ #include "dbChannelIOIL.h" #include "db_access_routines.h" +#if defined ( _MSC_VER ) +# pragma warning ( push ) +# pragma warning ( disable: 4660 ) +#endif + template class tsFreeList < dbSubscriptionIO >; + +#if defined ( _MSC_VER ) +# pragma warning ( pop ) +#endif + tsFreeList < dbSubscriptionIO > dbSubscriptionIO::freeList; epicsMutex dbSubscriptionIO::freeListMutex; diff --git a/src/libCom/cxxTemplates/resourceLib.h b/src/libCom/cxxTemplates/resourceLib.h index 65eaa9644..40699852a 100644 --- a/src/libCom/cxxTemplates/resourceLib.h +++ b/src/libCom/cxxTemplates/resourceLib.h @@ -592,6 +592,27 @@ resTable::~resTable() operator delete ( this->pTable ); } +// +// resTable::resTable ( const resTable & ) +// private - not to be used - implemented to shush +// MS warnings +// +template +inline resTable::resTable ( const resTable & ) +{ +} + +// +// resTable::resTable & operator = ( const resTable & ) +// private - not to be used - implemented to shush +// MS warnings +// +template +inline resTable & resTable::operator = ( const resTable & ) +{ + return *this; +} + ////////////////////////////////////////////// // resTableIter member functions ////////////////////////////////////////////// diff --git a/src/libCom/cxxTemplates/tsFreeList.h b/src/libCom/cxxTemplates/tsFreeList.h index 0881fb6a0..1f6613276 100644 --- a/src/libCom/cxxTemplates/tsFreeList.h +++ b/src/libCom/cxxTemplates/tsFreeList.h @@ -58,7 +58,9 @@ // these versions of the microsoft compiler incorrectly // warn about a missing delete operator if only the -// preferred delete operator with a size argument is present +// newly preferred delete operator with a size argument +// is present - I expect that they will fix this in the +// next version #if defined ( _MSC_VER ) && _MSC_VER <= 1200 # pragma warning ( disable : 4291 ) #endif diff --git a/src/libCom/fdmgr/fdManager.cpp b/src/libCom/fdmgr/fdManager.cpp index de2dbd459..cf925e3bf 100644 --- a/src/libCom/fdmgr/fdManager.cpp +++ b/src/libCom/fdmgr/fdManager.cpp @@ -53,10 +53,19 @@ #include "fdManager.h" #include "locationException.h" +#if defined ( _MSC_VER ) +# pragma warning ( push ) +# pragma warning ( disable: 4660 ) +#endif + template class tsSLNode < fdReg >; template class intId < unsigned int, 8, 32 >; template class resTable < fdReg, fdRegId >; +#if defined ( _MSC_VER ) +# pragma warning ( pop ) +#endif + epicsShareDef fdManager fileDescriptorManager; // diff --git a/src/libCom/fdmgr/fdmgr.cpp b/src/libCom/fdmgr/fdmgr.cpp index 31f4cebd1..d3b926bc6 100644 --- a/src/libCom/fdmgr/fdmgr.cpp +++ b/src/libCom/fdmgr/fdmgr.cpp @@ -97,10 +97,19 @@ private: chronIntIdResTable resTbl; }; +#if defined ( _MSC_VER ) +# pragma warning ( push ) +# pragma warning ( disable: 4660 ) +#endif + template class resTable < timerForOldFdmgr, chronIntId >; template class tsSLNode < timerForOldFdmgr >; template class chronIntIdResTable < timerForOldFdmgr >; +#if defined ( _MSC_VER ) +# pragma warning ( pop ) +#endif + epicsShareFunc fdRegForOldFdmgr::fdRegForOldFdmgr (const SOCKET fdIn, const fdRegType typeIn, const bool onceOnlyIn, fdManager &managerIn, diff --git a/src/libCom/test/epicsTimerTest.cpp b/src/libCom/test/epicsTimerTest.cpp index f045dfa63..bd248da5a 100644 --- a/src/libCom/test/epicsTimerTest.cpp +++ b/src/libCom/test/epicsTimerTest.cpp @@ -348,10 +348,19 @@ void testPeriodic () queue.release (); } +#if defined ( _MSC_VER ) +# pragma warning ( push ) +# pragma warning ( disable: 4660 ) +#endif + template class tsFreeList < delayVerify, 32, 0 >; template class tsFreeList < cancelVerify, 32, 0 >; template class tsFreeList < periodicVerify, 32, 0 >; +#if defined ( _MSC_VER ) +# pragma warning ( pop ) +#endif + void epicsTimerTest () { testAccuracy (); diff --git a/src/libCom/timer/epicsTimer.cpp b/src/libCom/timer/epicsTimer.cpp index 5333ed638..1f70eab06 100644 --- a/src/libCom/timer/epicsTimer.cpp +++ b/src/libCom/timer/epicsTimer.cpp @@ -32,10 +32,19 @@ #include "epicsTimer.h" #include "timerPrivate.h" +#if defined ( _MSC_VER ) +# pragma warning ( push ) +# pragma warning ( disable: 4660 ) +#endif + template class tsFreeList < epicsTimerForC, 32, 0 >; template class tsFreeList < epicsTimerQueueActiveForC, 1024, 0 >; template class tsFreeList < epicsTimerQueuePassiveForC, 1024, 0 >; +#if defined ( _MSC_VER ) +# pragma warning ( pop ) +#endif + struct epicsTimerQueuePassiveForC : public epicsTimerQueueNotify, public timerQueuePassive { public: epicsTimerQueuePassiveForC ( epicsTimerQueueRescheduleCallback pCallback, void *pPrivate ); diff --git a/src/libCom/timer/timer.cpp b/src/libCom/timer/timer.cpp index cced050c2..57411808f 100644 --- a/src/libCom/timer/timer.cpp +++ b/src/libCom/timer/timer.cpp @@ -32,8 +32,17 @@ #define epicsExportSharedSymbols #include "timerPrivate.h" +#if defined ( _MSC_VER ) +# pragma warning ( push ) +# pragma warning ( disable: 4660 ) +#endif + template class tsFreeList < timer, 32, 0 >; +#if defined ( _MSC_VER ) +# pragma warning ( pop ) +#endif + timer::timer ( timerQueue &queueIn ) : curState ( stateLimbo ), pNotify ( 0 ), queue ( queueIn ) {