From 8ea1598a13e2344a8733ffe2c79abacfe7f477f4 Mon Sep 17 00:00:00 2001 From: Andrew Stitcher Date: Tue, 7 Jun 2011 21:33:46 +0000 Subject: QPID-3284: Eliminated warnings from gcc 4.6 compiler - Removed a bunch of variables set but not further used. - Rejigged some asserts which would now have unused vars if compiler -DNDEBUG git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1133166 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/cluster/Cluster.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cpp/src/qpid/cluster') diff --git a/cpp/src/qpid/cluster/Cluster.cpp b/cpp/src/qpid/cluster/Cluster.cpp index 0daf0c7f5a..ede8d96681 100644 --- a/cpp/src/qpid/cluster/Cluster.cpp +++ b/cpp/src/qpid/cluster/Cluster.cpp @@ -365,7 +365,8 @@ void Cluster::addShadowConnection(const boost::intrusive_ptr& c) { assert(discarding); pair ib = connections.insert(ConnectionMap::value_type(c->getId(), c)); - assert(ib.second); + // Like this to avoid tripping up unused variable warning when NDEBUG set + if (!ib.second) assert(ib.second); } void Cluster::erase(const ConnectionId& id) { -- cgit v1.2.1