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/client/test/client_test.cpp | 4 ++-- cpp/client/test/topic_listener.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'cpp/client/test') diff --git a/cpp/client/test/client_test.cpp b/cpp/client/test/client_test.cpp index e33beb3b67..b899d494d7 100644 --- a/cpp/client/test/client_test.cpp +++ b/cpp/client/test/client_test.cpp @@ -36,7 +36,7 @@ class SimpleListener : public virtual MessageListener{ public: inline SimpleListener(Monitor* _monitor) : monitor(_monitor){} - inline virtual void received(Message& msg){ + inline virtual void received(Message& /*msg*/){ std::cout << "Received message " /**<< msg **/<< std::endl; monitor->acquire(); monitor->notify(); @@ -44,7 +44,7 @@ public: } }; -int main(int argc, char** argv) +int main(int argc, char**) { try{ Connection con(argc > 1); diff --git a/cpp/client/test/topic_listener.cpp b/cpp/client/test/topic_listener.cpp index d5b6d77c1a..a1b8e383a0 100644 --- a/cpp/client/test/topic_listener.cpp +++ b/cpp/client/test/topic_listener.cpp @@ -125,11 +125,11 @@ void Listener::shutdown(){ void Listener::report(){ apr_time_t finish = apr_time_as_msec(apr_time_now()); apr_time_t time = finish - start; - std::stringstream report; - report << "Received " << count << " messages in " << time << " ms."; + std::stringstream reportstr; + reportstr << "Received " << count << " messages in " << time << " ms."; Message msg; - msg.setData(report.str()); - channel->publish(msg, string(""), responseQueue); + msg.setData(reportstr.str()); + channel->publish(msg, string(), responseQueue); if(transactional){ channel->commit(); } -- cgit v1.2.1