From c035566d7d281eab0de496c2557e90d0250b97e8 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Tue, 4 Aug 2009 19:10:30 +0000 Subject: [PATCH] Use compile-time assertions, from Micheal Davidsaver. --- src/ca/iocinf.cpp | 2 +- src/cas/io/bsdSocket/casDGIntfIO.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ca/iocinf.cpp b/src/ca/iocinf.cpp index 789568cf6..93328aada 100644 --- a/src/ca/iocinf.cpp +++ b/src/ca/iocinf.cpp @@ -127,7 +127,7 @@ extern "C" void epicsShareAPI removeDuplicateAddresses ELLNODE *pRawNode; while ( (pRawNode = ellGet ( pSrcList ) ) ) { - assert ( offsetof (osiSockAddrNode, node) == 0 ); + STATIC_ASSERT ( offsetof (osiSockAddrNode, node) == 0 ); osiSockAddrNode *pNode = reinterpret_cast ( pRawNode ); osiSockAddrNode *pTmpNode; diff --git a/src/cas/io/bsdSocket/casDGIntfIO.cc b/src/cas/io/bsdSocket/casDGIntfIO.cc index ee06bac14..96add8a89 100644 --- a/src/cas/io/bsdSocket/casDGIntfIO.cc +++ b/src/cas/io/bsdSocket/casDGIntfIO.cc @@ -181,7 +181,7 @@ casDGIntfIO::casDGIntfIO ( caServerI & serverIn, clientBufMemoryManager & memMgr removeDuplicateAddresses ( & filtered, & parsed, true ); while ( ELLNODE * pRawNode = ellGet ( & filtered ) ) { - assert ( offsetof (osiSockAddrNode, node) == 0 ); + STATIC_ASSERT ( offsetof (osiSockAddrNode, node) == 0 ); osiSockAddrNode * pNode = reinterpret_cast < osiSockAddrNode * > ( pRawNode ); if ( pNode->addr.sa.sa_family == AF_INET ) { ipIgnoreEntry * pIPI = new ( this->ipIgnoreEntryFreeList )