From 794811b95a026d99d088871c061f4e7325f0887a Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Mon, 24 Aug 2009 17:03:17 +0000 Subject: [PATCH] exp passed to assert must not change the state of the data structures --- src/ca/comQueSend.h | 3 ++- src/ca/nciu.cpp | 4 ++-- src/ca/repeater.cpp | 5 ++++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/ca/comQueSend.h b/src/ca/comQueSend.h index c1be89440..808285e7a 100644 --- a/src/ca/comQueSend.h +++ b/src/ca/comQueSend.h @@ -145,7 +145,8 @@ private: return; } pComBuf = newComBuf (); - assert ( pComBuf->push ( val ) ); + bool success = pComBuf->push ( val ); + assert ( success ); this->pushComBuf ( *pComBuf ); } diff --git a/src/ca/nciu.cpp b/src/ca/nciu.cpp index be65d87d5..f61172808 100644 --- a/src/ca/nciu.cpp +++ b/src/ca/nciu.cpp @@ -79,8 +79,8 @@ void nciu::destroy ( epicsGuard < epicsMutex > & guard ) { while ( baseNMIU * pNetIO = this->eventq.first () ) { - assert ( this->cacCtx.destroyIO ( - guard, pNetIO->getId (), *this ) ); + bool success = this->cacCtx.destroyIO ( guard, pNetIO->getId (), *this ); + assert ( success ); } // if the claim reply has not returned yet then we will issue diff --git a/src/ca/repeater.cpp b/src/ca/repeater.cpp index a8943b2f1..64016aed6 100644 --- a/src/ca/repeater.cpp +++ b/src/ca/repeater.cpp @@ -511,7 +511,10 @@ void ca_repeater () pBuf = new char [MAX_UDP_RECV]; - assert ( osiSockAttach() ); + { + bool success = osiSockAttach(); + assert ( success ); + } port = envGetInetPortConfigParam ( & EPICS_CA_REPEATER_PORT, static_cast (CA_REPEATER_PORT) );