diff options
author | Alan Conway <aconway@apache.org> | 2012-07-24 19:38:57 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2012-07-24 19:38:57 +0000 |
commit | 828e28e9e58028b04ddaa97bb57c9d5b5c7a4f73 (patch) | |
tree | d388747f8ce5aa59f7f4885c86b251cc2c75ef7c | |
parent | 95d7e7dce5a56465cb8948fda8e969997c475ac7 (diff) | |
download | qpid-python-828e28e9e58028b04ddaa97bb57c9d5b5c7a4f73.tar.gz |
QPID-4165: Fix unsused variable warnings when compiling with -DNDEBUG
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/0.18@1365251 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | qpid/cpp/src/qpid/amqp_0_10/Codecs.cpp | 6 | ||||
-rw-r--r-- | qpid/cpp/src/qpid/broker/LinkRegistry.cpp | 2 | ||||
-rw-r--r-- | qpid/cpp/src/qpid/broker/MessageMap.cpp | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/qpid/cpp/src/qpid/amqp_0_10/Codecs.cpp b/qpid/cpp/src/qpid/amqp_0_10/Codecs.cpp index 8fc6629801..1288652ee1 100644 --- a/qpid/cpp/src/qpid/amqp_0_10/Codecs.cpp +++ b/qpid/cpp/src/qpid/amqp_0_10/Codecs.cpp @@ -406,7 +406,7 @@ void encode(const Variant::Map& map, uint32_t len, qpid::framing::Buffer& buffer buffer.putShortString(i->first); encode(i->second, buffer); } - assert(s + len == buffer.getPosition()); + (void) s; assert(s + len == buffer.getPosition()); } void encode(const Variant::Map& map, const std::string& efield, const Variant& evalue, uint32_t len, qpid::framing::Buffer& buffer) @@ -421,7 +421,7 @@ void encode(const Variant::Map& map, const std::string& efield, const Variant& e buffer.putShortString(efield); encode(evalue, buffer); - assert(s + len == buffer.getPosition()); + (void) s; assert(s + len == buffer.getPosition()); } void encode(const Variant::List& list, uint32_t len, qpid::framing::Buffer& buffer) @@ -432,7 +432,7 @@ void encode(const Variant::List& list, uint32_t len, qpid::framing::Buffer& buff for (Variant::List::const_iterator i = list.begin(); i != list.end(); ++i) { encode(*i, buffer); } - assert(s + len == buffer.getPosition()); + (void) s; assert(s + len == buffer.getPosition()); } void decode(qpid::framing::Buffer&, Variant::Map&) diff --git a/qpid/cpp/src/qpid/broker/LinkRegistry.cpp b/qpid/cpp/src/qpid/broker/LinkRegistry.cpp index 31b113c4d9..0507fe6521 100644 --- a/qpid/cpp/src/qpid/broker/LinkRegistry.cpp +++ b/qpid/cpp/src/qpid/broker/LinkRegistry.cpp @@ -317,7 +317,7 @@ void LinkRegistry::notifyConnection(const std::string& key, Connection* c) // create a mapping from connection id to link QPID_LOG(debug, "LinkRegistry::notifyConnection(); key=" << key ); std::string host; - uint16_t port; + uint16_t port = 0; extractHostPort( key, &host, &port ); Link::shared_ptr link; { diff --git a/qpid/cpp/src/qpid/broker/MessageMap.cpp b/qpid/cpp/src/qpid/broker/MessageMap.cpp index d6702a9336..592f3fefde 100644 --- a/qpid/cpp/src/qpid/broker/MessageMap.cpp +++ b/qpid/cpp/src/qpid/broker/MessageMap.cpp @@ -146,7 +146,7 @@ bool MessageMap::push(const QueuedMessage& added, QueuedMessage& removed) void MessageMap::setPosition(const framing::SequenceNumber& seq) { // Nothing to do, just assert that the precondition is respected and there // are no undeleted messages after seq. - assert(messages.empty() || (--messages.end())->first <= seq); + (void) seq; assert(messages.empty() || (--messages.end())->first <= seq); } void MessageMap::foreach(Functor f) |