From 2bcadbb42a6fb2f096c1fc0a4b957d64a5024ef6 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Wed, 11 Oct 2006 15:50:15 +0000 Subject: Turned up gcc warnings, fixed warnings in code, enabled -Werror. Note: #include "qpid_test_plugin.h" instead of Works around warning from a cppunit macro. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@462834 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/broker/src/TopicExchange.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'cpp/broker/src/TopicExchange.cpp') diff --git a/cpp/broker/src/TopicExchange.cpp b/cpp/broker/src/TopicExchange.cpp index 287502bc88..53977747c4 100644 --- a/cpp/broker/src/TopicExchange.cpp +++ b/cpp/broker/src/TopicExchange.cpp @@ -47,6 +47,7 @@ size_t Tokens::Hash::operator()(const Tokens& p) const { for (Tokens::const_iterator i = p.begin(); i != p.end(); ++i) { hash += std::tr1::hash()(*i); } + return hash; } TopicPattern& TopicPattern::operator=(const Tokens& tokens) { @@ -119,7 +120,7 @@ bool TopicPattern::match(const Tokens& target) const return do_match(begin(), end(), target.begin(), target.end()); } -TopicExchange::TopicExchange(const string& name) : Exchange(name) { } +TopicExchange::TopicExchange(const string& _name) : Exchange(_name) { } void TopicExchange::bind(Queue::shared_ptr queue, const string& routingKey, FieldTable* args){ lock.acquire(); @@ -129,7 +130,7 @@ void TopicExchange::bind(Queue::shared_ptr queue, const string& routingKey, Fiel lock.release(); } -void TopicExchange::unbind(Queue::shared_ptr queue, const string& routingKey, FieldTable* args){ +void TopicExchange::unbind(Queue::shared_ptr queue, const string& routingKey, FieldTable* /*args*/){ lock.acquire(); BindingMap::iterator bi = bindings.find(TopicPattern(routingKey)); Queue::vector& qv(bi->second); @@ -142,7 +143,7 @@ void TopicExchange::unbind(Queue::shared_ptr queue, const string& routingKey, Fi } -void TopicExchange::route(Message::shared_ptr& msg, const string& routingKey, FieldTable* args){ +void TopicExchange::route(Message::shared_ptr& msg, const string& routingKey, FieldTable* /*args*/){ lock.acquire(); for (BindingMap::iterator i = bindings.begin(); i != bindings.end(); ++i) { if (i->first.match(routingKey)) { -- cgit v1.2.1