summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/QueueFlowLimit.cpp
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2011-06-07 21:33:46 +0000
committerAndrew Stitcher <astitcher@apache.org>2011-06-07 21:33:46 +0000
commit8ea1598a13e2344a8733ffe2c79abacfe7f477f4 (patch)
tree5e90f3011f801e6b80e4165bd08431ea88498c92 /cpp/src/qpid/broker/QueueFlowLimit.cpp
parentdea4bb69afc5f91f523af65580ce4a8d75d3df68 (diff)
downloadqpid-python-8ea1598a13e2344a8733ffe2c79abacfe7f477f4.tar.gz
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
Diffstat (limited to 'cpp/src/qpid/broker/QueueFlowLimit.cpp')
-rw-r--r--cpp/src/qpid/broker/QueueFlowLimit.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/cpp/src/qpid/broker/QueueFlowLimit.cpp b/cpp/src/qpid/broker/QueueFlowLimit.cpp
index b2e2e54bdf..fcf8d089f9 100644
--- a/cpp/src/qpid/broker/QueueFlowLimit.cpp
+++ b/cpp/src/qpid/broker/QueueFlowLimit.cpp
@@ -167,7 +167,8 @@ void QueueFlowLimit::enqueued(const QueuedMessage& msg)
msg.payload->getIngressCompletion().startCompleter(); // don't complete until flow resumes
bool unique;
unique = index.insert(std::pair<framing::SequenceNumber, boost::intrusive_ptr<Message> >(msg.position, msg.payload)).second;
- assert(unique);
+ // Like this to avoid tripping up unused variable warning when NDEBUG set
+ if (!unique) assert(unique);
}
}
@@ -379,7 +380,8 @@ void QueueFlowLimit::setState(const qpid::framing::FieldTable& state)
QueuedMessage msg(queue->find(seq)); // fyi: msg.payload may be null if msg is delivered & unacked
bool unique;
unique = index.insert(std::pair<framing::SequenceNumber, boost::intrusive_ptr<Message> >(seq, msg.payload)).second;
- assert(unique);
+ // Like this to avoid tripping up unused variable warning when NDEBUG set
+ if (!unique) assert(unique);
}
}
}