You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2006/10/11 17:50:21 UTC

svn commit: r462834 [1/2] - in /incubator/qpid/trunk/qpid/cpp: ./ broker/inc/ broker/src/ broker/test/ client/inc/ client/src/ client/test/ common/ common/concurrent/inc/ common/concurrent/src/ common/framing/generated/stylesheets/ common/framing/inc/ ...

Author: aconway
Date: Wed Oct 11 08:50:15 2006
New Revision: 462834

URL: http://svn.apache.org/viewvc?view=rev&rev=462834
Log:
Turned up gcc warnings, fixed warnings in code, enabled -Werror.
Note: #include "qpid_test_plugin.h" instead of <cppunit/TestPlugin.h> 
Works around warning from a cppunit macro.

Added:
    incubator/qpid/trunk/qpid/cpp/client/src/MessageListener.cpp   (with props)
    incubator/qpid/trunk/qpid/cpp/client/src/ReturnedMessageHandler.cpp   (with props)
    incubator/qpid/trunk/qpid/cpp/common/concurrent/src/Runnable.cpp   (with props)
    incubator/qpid/trunk/qpid/cpp/common/framing/src/InitiationHandler.cpp   (with props)
    incubator/qpid/trunk/qpid/cpp/common/framing/src/InputHandler.cpp   (with props)
    incubator/qpid/trunk/qpid/cpp/common/framing/src/OutputHandler.cpp   (with props)
    incubator/qpid/trunk/qpid/cpp/test/
    incubator/qpid/trunk/qpid/cpp/test/include/
    incubator/qpid/trunk/qpid/cpp/test/include/qpid_test_plugin.h   (with props)
Removed:
    incubator/qpid/trunk/qpid/cpp/common/utils/inc/logger.h
    incubator/qpid/trunk/qpid/cpp/common/utils/src/logger.cpp
    incubator/qpid/trunk/qpid/cpp/common/utils/src/logger_test.cpp
Modified:
    incubator/qpid/trunk/qpid/cpp/broker/inc/Channel.h
    incubator/qpid/trunk/qpid/cpp/broker/inc/Exchange.h
    incubator/qpid/trunk/qpid/cpp/broker/inc/TopicExchange.h
    incubator/qpid/trunk/qpid/cpp/broker/src/Broker.cpp
    incubator/qpid/trunk/qpid/cpp/broker/src/Channel.cpp
    incubator/qpid/trunk/qpid/cpp/broker/src/Configuration.cpp
    incubator/qpid/trunk/qpid/cpp/broker/src/DirectExchange.cpp
    incubator/qpid/trunk/qpid/cpp/broker/src/FanOutExchange.cpp
    incubator/qpid/trunk/qpid/cpp/broker/src/HeadersExchange.cpp
    incubator/qpid/trunk/qpid/cpp/broker/src/Message.cpp
    incubator/qpid/trunk/qpid/cpp/broker/src/Queue.cpp
    incubator/qpid/trunk/qpid/cpp/broker/src/SessionHandlerImpl.cpp
    incubator/qpid/trunk/qpid/cpp/broker/src/TopicExchange.cpp
    incubator/qpid/trunk/qpid/cpp/broker/test/ChannelTest.cpp
    incubator/qpid/trunk/qpid/cpp/broker/test/HeadersExchangeTest.cpp
    incubator/qpid/trunk/qpid/cpp/broker/test/QueueRegistryTest.cpp
    incubator/qpid/trunk/qpid/cpp/broker/test/QueueTest.cpp
    incubator/qpid/trunk/qpid/cpp/broker/test/RouterTest.cpp
    incubator/qpid/trunk/qpid/cpp/broker/test/TopicExchangeTest.cpp
    incubator/qpid/trunk/qpid/cpp/broker/test/ValueTest.cpp
    incubator/qpid/trunk/qpid/cpp/broker/test/exchange_test.cpp
    incubator/qpid/trunk/qpid/cpp/broker/test/message_test.cpp
    incubator/qpid/trunk/qpid/cpp/client/inc/IncomingMessage.h
    incubator/qpid/trunk/qpid/cpp/client/inc/Message.h
    incubator/qpid/trunk/qpid/cpp/client/inc/MessageListener.h
    incubator/qpid/trunk/qpid/cpp/client/inc/ReturnedMessageHandler.h
    incubator/qpid/trunk/qpid/cpp/client/src/Channel.cpp
    incubator/qpid/trunk/qpid/cpp/client/src/Connection.cpp
    incubator/qpid/trunk/qpid/cpp/client/src/IncomingMessage.cpp
    incubator/qpid/trunk/qpid/cpp/client/src/Queue.cpp
    incubator/qpid/trunk/qpid/cpp/client/src/ResponseHandler.cpp
    incubator/qpid/trunk/qpid/cpp/client/test/client_test.cpp
    incubator/qpid/trunk/qpid/cpp/client/test/topic_listener.cpp
    incubator/qpid/trunk/qpid/cpp/common/Makefile
    incubator/qpid/trunk/qpid/cpp/common/concurrent/inc/Runnable.h
    incubator/qpid/trunk/qpid/cpp/common/concurrent/src/APRBase.cpp
    incubator/qpid/trunk/qpid/cpp/common/concurrent/src/APRThread.cpp
    incubator/qpid/trunk/qpid/cpp/common/concurrent/src/APRThreadPool.cpp
    incubator/qpid/trunk/qpid/cpp/common/framing/generated/stylesheets/amqp_client_handler_impl.xsl
    incubator/qpid/trunk/qpid/cpp/common/framing/generated/stylesheets/amqp_server_handler_impl.xsl
    incubator/qpid/trunk/qpid/cpp/common/framing/generated/stylesheets/amqp_server_operations.xsl
    incubator/qpid/trunk/qpid/cpp/common/framing/generated/stylesheets/cpp.xsl
    incubator/qpid/trunk/qpid/cpp/common/framing/inc/AMQHeaderBody.h
    incubator/qpid/trunk/qpid/cpp/common/framing/inc/AMQHeartbeatBody.h
    incubator/qpid/trunk/qpid/cpp/common/framing/inc/BasicHeaderProperties.h
    incubator/qpid/trunk/qpid/cpp/common/framing/inc/BodyHandler.h
    incubator/qpid/trunk/qpid/cpp/common/framing/inc/Buffer.h
    incubator/qpid/trunk/qpid/cpp/common/framing/inc/InitiationHandler.h
    incubator/qpid/trunk/qpid/cpp/common/framing/inc/InputHandler.h
    incubator/qpid/trunk/qpid/cpp/common/framing/inc/OutputHandler.h
    incubator/qpid/trunk/qpid/cpp/common/framing/inc/Value.h
    incubator/qpid/trunk/qpid/cpp/common/framing/src/AMQContentBody.cpp
    incubator/qpid/trunk/qpid/cpp/common/framing/src/AMQFrame.cpp
    incubator/qpid/trunk/qpid/cpp/common/framing/src/AMQHeaderBody.cpp
    incubator/qpid/trunk/qpid/cpp/common/framing/src/AMQMethodBody.cpp
    incubator/qpid/trunk/qpid/cpp/common/framing/src/BasicHeaderProperties.cpp
    incubator/qpid/trunk/qpid/cpp/common/framing/src/BodyHandler.cpp
    incubator/qpid/trunk/qpid/cpp/common/framing/src/Buffer.cpp
    incubator/qpid/trunk/qpid/cpp/common/framing/src/FieldTable.cpp
    incubator/qpid/trunk/qpid/cpp/common/framing/test/BodyHandlerTest.cpp
    incubator/qpid/trunk/qpid/cpp/common/framing/test/field_table_test.cpp
    incubator/qpid/trunk/qpid/cpp/common/framing/test/framing_test.cpp
    incubator/qpid/trunk/qpid/cpp/common/framing/test/header_test.cpp
    incubator/qpid/trunk/qpid/cpp/common/io/Makefile
    incubator/qpid/trunk/qpid/cpp/common/io/inc/APRConnector.h
    incubator/qpid/trunk/qpid/cpp/common/io/inc/ConnectorImpl.h
    incubator/qpid/trunk/qpid/cpp/common/io/inc/LFProcessor.h
    incubator/qpid/trunk/qpid/cpp/common/io/src/APRConnector.cpp
    incubator/qpid/trunk/qpid/cpp/common/io/src/APRSocket.cpp
    incubator/qpid/trunk/qpid/cpp/common/io/src/BlockingAPRAcceptor.cpp
    incubator/qpid/trunk/qpid/cpp/common/io/src/BlockingAPRSessionContext.cpp
    incubator/qpid/trunk/qpid/cpp/common/io/src/LFAcceptor.cpp
    incubator/qpid/trunk/qpid/cpp/common/io/src/LFProcessor.cpp
    incubator/qpid/trunk/qpid/cpp/common/io/src/LFSessionContext.cpp
    incubator/qpid/trunk/qpid/cpp/common/utils/src/Makefile
    incubator/qpid/trunk/qpid/cpp/options.mk

Modified: incubator/qpid/trunk/qpid/cpp/broker/inc/Channel.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/broker/inc/Channel.h?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/broker/inc/Channel.h (original)
+++ incubator/qpid/trunk/qpid/cpp/broker/inc/Channel.h Wed Oct 11 08:50:15 2006
@@ -146,8 +146,8 @@
             ~Channel();
             inline void setDefaultQueue(Queue::shared_ptr queue){ defaultQueue = queue; }
             inline Queue::shared_ptr getDefaultQueue(){ return defaultQueue; }
-            inline u_int32_t setPrefetchSize(u_int32_t size){ prefetchSize = size; }
-            inline u_int16_t setPrefetchCount(u_int16_t count){ prefetchCount = count; }
+            inline u_int32_t setPrefetchSize(u_int32_t size){ return prefetchSize = size; }
+            inline u_int16_t setPrefetchCount(u_int16_t count){ return prefetchCount = count; }
             bool exists(const string& consumerTag);
             void consume(string& tag, Queue::shared_ptr queue, bool acks, bool exclusive, ConnectionToken* const connection = 0);
             void cancel(const string& tag);

Modified: incubator/qpid/trunk/qpid/cpp/broker/inc/Exchange.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/broker/inc/Exchange.h?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/broker/inc/Exchange.h (original)
+++ incubator/qpid/trunk/qpid/cpp/broker/inc/Exchange.h Wed Oct 11 08:50:15 2006
@@ -27,7 +27,7 @@
     class Exchange{
         const std::string name;
       public:
-        explicit Exchange(const std::string& name) : name(name) {}
+        explicit Exchange(const std::string& _name) : name(_name) {}
         virtual ~Exchange(){}
         std::string getName() { return name; }
         virtual void bind(Queue::shared_ptr queue, const string& routingKey, qpid::framing::FieldTable* args) = 0;

Modified: incubator/qpid/trunk/qpid/cpp/broker/inc/TopicExchange.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/broker/inc/TopicExchange.h?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/broker/inc/TopicExchange.h (original)
+++ incubator/qpid/trunk/qpid/cpp/broker/inc/TopicExchange.h Wed Oct 11 08:50:15 2006
@@ -57,7 +57,7 @@
     TopicPattern(const Tokens& tokens) { operator=(tokens); }
     TopicPattern(const std::string& str) { operator=(str); }
     TopicPattern& operator=(const Tokens&);
-    TopicPattern& operator=(const std::string& str) { operator=(Tokens(str)); }
+    TopicPattern& operator=(const std::string& str) { return operator=(Tokens(str)); }
     
     /** Match a topic */
     bool match(const std::string& topic) { return match(Tokens(topic)); }

Modified: incubator/qpid/trunk/qpid/cpp/broker/src/Broker.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/broker/src/Broker.cpp?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/broker/src/Broker.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/broker/src/Broker.cpp Wed Oct 11 08:50:15 2006
@@ -87,6 +87,6 @@
     throw Configuration::ParseException("Unrecognised acceptor: " + type);
 }
 
-void handle_signal(int signal){
+void handle_signal(int /*signal*/){
     std::cout << "Shutting down..." << std::endl;
 }

Modified: incubator/qpid/trunk/qpid/cpp/broker/src/Channel.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/broker/src/Channel.cpp?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/broker/src/Channel.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/broker/src/Channel.cpp Wed Oct 11 08:50:15 2006
@@ -26,16 +26,17 @@
 using namespace qpid::concurrent;
 
 
-Channel::Channel(OutputHandler* _out, int _id, u_int32_t _framesize) : out(_out), 
-                                                                       id(_id), 
-                                                                       prefetchCount(0),
-                                                                       prefetchSize(0),
-                                                                       outstandingSize(0),
-                                                                       outstandingCount(0),
-                                                                       framesize(_framesize),
-                                                                       transactional(false),
-                                                                       deliveryTag(1),
-                                                                       tagGenerator("sgen"){}
+Channel::Channel(OutputHandler* _out, int _id, u_int32_t _framesize) :
+    id(_id), 
+    out(_out), 
+    deliveryTag(1),
+    transactional(false),
+    prefetchSize(0),
+    prefetchCount(0),
+    outstandingSize(0),
+    outstandingCount(0),
+    framesize(_framesize),
+    tagGenerator("sgen"){}
 
 Channel::~Channel(){
 }
@@ -156,10 +157,10 @@
     message = Message::shared_ptr(msg);
 }
 
-void Channel::ack(u_int64_t deliveryTag, bool multiple){
+void Channel::ack(u_int64_t _deliveryTag, bool multiple){
     Locker locker(deliveryLock);//need to synchronize with possible concurrent delivery
     
-    ack_iterator i = find_if(unacknowledged.begin(), unacknowledged.end(), MatchAck(deliveryTag));
+    ack_iterator i = find_if(unacknowledged.begin(), unacknowledged.end(), MatchAck(_deliveryTag));
     if(i == unacknowledged.end()){
         throw InvalidAckException();
     }else if(multiple){        
@@ -178,8 +179,8 @@
 
     //if the prefetch limit had previously been reached, there may
     //be messages that can be now be delivered
-    for(consumer_iterator i = consumers.begin(); i != consumers.end(); i++){
-        i->second->requestDispatch();
+    for(consumer_iterator j = consumers.begin(); j != consumers.end(); j++){
+        j->second->requestDispatch();
     }
 }
 

Modified: incubator/qpid/trunk/qpid/cpp/broker/src/Configuration.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/broker/src/Configuration.cpp?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/broker/src/Configuration.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/broker/src/Configuration.cpp Wed Oct 11 08:50:15 2006
@@ -16,6 +16,7 @@
  *
  */
 #include "Configuration.h"
+#include <string.h>
 
 using namespace qpid::broker;
 using namespace std;
@@ -191,5 +192,5 @@
 }
 
 void Configuration::BoolOption::setValue(const std::string& _value){
-    value = true;
+    value = strcasecmp(_value.c_str(), "true") == 0;
 }

Modified: incubator/qpid/trunk/qpid/cpp/broker/src/DirectExchange.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/broker/src/DirectExchange.cpp?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/broker/src/DirectExchange.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/broker/src/DirectExchange.cpp Wed Oct 11 08:50:15 2006
@@ -22,7 +22,7 @@
 using namespace qpid::broker;
 using namespace qpid::framing;
 
-DirectExchange::DirectExchange(const string& name) : Exchange(name) {
+DirectExchange::DirectExchange(const string& _name) : Exchange(_name) {
 
 }
 
@@ -37,7 +37,7 @@
     lock.release();
 }
 
-void DirectExchange::unbind(Queue::shared_ptr queue, const string& routingKey, FieldTable* args){
+void DirectExchange::unbind(Queue::shared_ptr queue, const string& routingKey, FieldTable* /*args*/){
     lock.acquire();
     std::vector<Queue::shared_ptr>& queues(bindings[routingKey]);
 
@@ -51,7 +51,7 @@
     lock.release();
 }
 
-void DirectExchange::route(Message::shared_ptr& msg, const string& routingKey, FieldTable* args){
+void DirectExchange::route(Message::shared_ptr& msg, const string& routingKey, FieldTable* /*args*/){
     lock.acquire();
     std::vector<Queue::shared_ptr>& queues(bindings[routingKey]);
     int count(0);

Modified: incubator/qpid/trunk/qpid/cpp/broker/src/FanOutExchange.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/broker/src/FanOutExchange.cpp?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/broker/src/FanOutExchange.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/broker/src/FanOutExchange.cpp Wed Oct 11 08:50:15 2006
@@ -23,7 +23,7 @@
 using namespace qpid::framing;
 using namespace qpid::concurrent;
 
-FanOutExchange::FanOutExchange(const std::string& name) : Exchange(name) {}
+FanOutExchange::FanOutExchange(const std::string& _name) : Exchange(_name) {}
 
 void FanOutExchange::bind(Queue::shared_ptr queue, const string& routingKey, FieldTable* args){
     Locker locker(lock);
@@ -35,7 +35,7 @@
     }
 }
 
-void FanOutExchange::unbind(Queue::shared_ptr queue, const string& routingKey, FieldTable* args){
+void FanOutExchange::unbind(Queue::shared_ptr queue, const string& /*routingKey*/, FieldTable* /*args*/){
     Locker locker(lock);
     Queue::vector::iterator i = std::find(bindings.begin(), bindings.end(), queue);
     if (i != bindings.end()) {
@@ -44,7 +44,7 @@
     }
 }
 
-void FanOutExchange::route(Message::shared_ptr& msg, const string& routingKey, FieldTable* args){
+void FanOutExchange::route(Message::shared_ptr& msg, const string& /*routingKey*/, FieldTable* /*args*/){
     Locker locker(lock);
     for(Queue::vector::iterator i = bindings.begin(); i != bindings.end(); ++i){
         (*i)->deliver(msg);

Modified: incubator/qpid/trunk/qpid/cpp/broker/src/HeadersExchange.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/broker/src/HeadersExchange.cpp?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/broker/src/HeadersExchange.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/broker/src/HeadersExchange.cpp Wed Oct 11 08:50:15 2006
@@ -18,8 +18,10 @@
 #include "HeadersExchange.h"
 #include "ExchangeBinding.h"
 #include "Value.h"
+#include "QpidError.h"
 #include <algorithm>
 
+
 using namespace qpid::broker;
 using namespace qpid::framing;
 using namespace qpid::concurrent;
@@ -28,38 +30,36 @@
 // The current search algorithm really sucks.
 // Fieldtables are heavy, maybe use shared_ptr to do handle-body.
 
-namespace qpid {
-namespace broker {
+using namespace qpid::broker;
 
 namespace {
-const std::string all("all");
-const std::string any("any");
-const std::string x_match("x-match");
+    const std::string all("all");
+    const std::string any("any");
+    const std::string x_match("x-match");
 }
 
-HeadersExchange::HeadersExchange(const string& name) : Exchange(name) { }
+HeadersExchange::HeadersExchange(const string& _name) : Exchange(_name) { }
 
 void HeadersExchange::bind(Queue::shared_ptr queue, const string& routingKey, FieldTable* args){
     std::cout << "HeadersExchange::bind" << std::endl;
     Locker locker(lock);
     std::string what = args->getString("x-match");
-    // TODO aconway 2006-09-26: throw an exception for invalid bindings.
-    if (what != all && what != any) return; // Invalid.
+    if (what != all && what != any) {
+        THROW_QPID_ERROR(PROTOCOL_ERROR, "Invalid x-match value binding to headers exchange.");
+    }
     bindings.push_back(Binding(*args, queue));
     queue->bound(new ExchangeBinding(this, queue, routingKey, args));
 }
 
-void HeadersExchange::unbind(Queue::shared_ptr queue, const string& routingKey, FieldTable* args){
-    Locker locker(lock);;
-    for (Bindings::iterator i = bindings.begin(); i != bindings.end(); ++i) {
-        if (i->first == *args) {
-            bindings.erase(i);
-        }
-    }
+void HeadersExchange::unbind(Queue::shared_ptr queue, const string& /*routingKey*/, FieldTable* args){
+    Locker locker(lock);
+    Bindings::iterator i =
+        std::find(bindings.begin(),bindings.end(), Binding(*args, queue));
+    if (i != bindings.end()) bindings.erase(i);
 }
 
 
-void HeadersExchange::route(Message::shared_ptr& msg, const string& routingKey, FieldTable* args){
+void HeadersExchange::route(Message::shared_ptr& msg, const string& /*routingKey*/, FieldTable* args){
     std::cout << "route: " << *args << std::endl;
     Locker locker(lock);;
     for (Bindings::iterator i = bindings.begin(); i != bindings.end(); ++i) {
@@ -70,12 +70,13 @@
 HeadersExchange::~HeadersExchange() {}
 
 const std::string HeadersExchange::typeName("headers");
+
 namespace 
 {
 
-bool match_values(const Value& bind, const Value& msg) {
-    return  dynamic_cast<const EmptyValue*>(&bind) || bind == msg;
-}
+    bool match_values(const Value& bind, const Value& msg) {
+        return  dynamic_cast<const EmptyValue*>(&bind) || bind == msg;
+    }
 
 }
 
@@ -115,5 +116,5 @@
     }
 }
 
-}}
+
 

Modified: incubator/qpid/trunk/qpid/cpp/broker/src/Message.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/broker/src/Message.cpp?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/broker/src/Message.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/broker/src/Message.cpp Wed Oct 11 08:50:15 2006
@@ -41,8 +41,8 @@
 Message::~Message(){
 }
 
-void Message::setHeader(AMQHeaderBody::shared_ptr header){
-    this->header = header;
+void Message::setHeader(AMQHeaderBody::shared_ptr _header){
+    this->header = _header;
 }
 
 void Message::addContent(AMQContentBody::shared_ptr data){

Modified: incubator/qpid/trunk/qpid/cpp/broker/src/Queue.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/broker/src/Queue.cpp?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/broker/src/Queue.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/broker/src/Queue.cpp Wed Oct 11 08:50:15 2006
@@ -22,16 +22,17 @@
 using namespace qpid::broker;
 using namespace qpid::concurrent;
 
-Queue::Queue(const string& _name, bool _durable, u_int32_t _autodelete, const ConnectionToken* const _owner) : name(_name), 
-                                                                                                               durable(_durable), 
-                                                                                                               autodelete(_autodelete),
-                                                                                                               owner(_owner), 
-                                                                                                               queueing(false),
-                                                                                                               dispatching(false),
-                                                                                                               next(0),
-                                                                                                               lastUsed(0),
-                                                                                                               exclusive(0){
-
+Queue::Queue(const string& _name, bool _durable, u_int32_t _autodelete, const ConnectionToken* const _owner) :
+    name(_name), 
+    autodelete(_autodelete),
+    durable(_durable), 
+    owner(_owner), 
+    queueing(false),
+    dispatching(false),
+    next(0),
+    lastUsed(0),
+    exclusive(0)
+{
     if(autodelete) lastUsed = apr_time_as_msec(apr_time_now());
 }
 

Modified: incubator/qpid/trunk/qpid/cpp/broker/src/SessionHandlerImpl.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/broker/src/SessionHandlerImpl.cpp?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/broker/src/SessionHandlerImpl.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/broker/src/SessionHandlerImpl.cpp Wed Oct 11 08:50:15 2006
@@ -33,21 +33,20 @@
                                        QueueRegistry* _queues, 
                                        ExchangeRegistry* _exchanges, 
                                        AutoDelete* _cleaner,
-                                       const u_int32_t _timeout) : context(_context), 
-                                                                   queues(_queues), 
-                                                                   exchanges(_exchanges),
-                                                                   cleaner(_cleaner),
-                                                                   timeout(_timeout),
-                                                                   channelHandler(new ChannelHandlerImpl(this)),
-                                                                   connectionHandler(new ConnectionHandlerImpl(this)),
-                                                                   basicHandler(new BasicHandlerImpl(this)),
-                                                                   exchangeHandler(new ExchangeHandlerImpl(this)),
-                                                                   queueHandler(new QueueHandlerImpl(this)),
-                                                                   client(context),
-                                                                   framemax(65536), 
-                                                                   heartbeat(0){
-
-}
+                                       const u_int32_t _timeout) :
+    context(_context), 
+    client(context),
+    queues(_queues), 
+    exchanges(_exchanges),
+    cleaner(_cleaner),
+    timeout(_timeout),
+    connectionHandler(new ConnectionHandlerImpl(this)),
+    channelHandler(new ChannelHandlerImpl(this)),
+    basicHandler(new BasicHandlerImpl(this)),
+    exchangeHandler(new ExchangeHandlerImpl(this)),
+    queueHandler(new QueueHandlerImpl(this)),
+    framemax(65536), 
+    heartbeat(0) {}
 
 SessionHandlerImpl::~SessionHandlerImpl(){
     // TODO aconway 2006-09-07: Should be auto_ptr or plain members.
@@ -123,7 +122,7 @@
     }
 }
 
-void SessionHandlerImpl::initiated(qpid::framing::ProtocolInitiation* header){
+void SessionHandlerImpl::initiated(qpid::framing::ProtocolInitiation* /*header*/){
     //send connection start
     FieldTable properties;
     string mechanisms("PLAIN");
@@ -161,51 +160,53 @@
     getChannel(channel)->handleContent(body, Router(*exchanges));
 }
 
-void SessionHandlerImpl::handleHeartbeat(AMQHeartbeatBody::shared_ptr body){
+void SessionHandlerImpl::handleHeartbeat(AMQHeartbeatBody::shared_ptr /*body*/){
     std::cout << "SessionHandlerImpl::handleHeartbeat()" << std::endl;
 }
         
-void SessionHandlerImpl::ConnectionHandlerImpl::startOk(u_int16_t channel, FieldTable& clientProperties, string& mechanism, 
-                                    string& response, string& locale){
+void SessionHandlerImpl::ConnectionHandlerImpl::startOk(
+    u_int16_t /*channel*/, FieldTable& /*clientProperties*/, string& /*mechanism*/, 
+    string& /*response*/, string& /*locale*/){
 
     parent->client.getConnection().tune(0, 100, parent->framemax, parent->heartbeat);
 }
         
-void SessionHandlerImpl::ConnectionHandlerImpl::secureOk(u_int16_t channel, string& response){}
+void SessionHandlerImpl::ConnectionHandlerImpl::secureOk(u_int16_t /*channel*/, string& /*response*/){}
         
-void SessionHandlerImpl::ConnectionHandlerImpl::tuneOk(u_int16_t channel, u_int16_t channelmax, u_int32_t framemax, u_int16_t heartbeat){
+void SessionHandlerImpl::ConnectionHandlerImpl::tuneOk(u_int16_t /*channel*/, u_int16_t /*channelmax*/, u_int32_t framemax, u_int16_t heartbeat){
     parent->framemax = framemax;
     parent->heartbeat = heartbeat;
 }
         
-void SessionHandlerImpl::ConnectionHandlerImpl::open(u_int16_t channel, string& virtualHost, string& capabilities, bool insist){
+void SessionHandlerImpl::ConnectionHandlerImpl::open(u_int16_t /*channel*/, string& /*virtualHost*/, string& /*capabilities*/, bool /*insist*/){
     string knownhosts;
     parent->client.getConnection().openOk(0, knownhosts);
 }
         
-void SessionHandlerImpl::ConnectionHandlerImpl::close(u_int16_t channel, u_int16_t replyCode, string& replyText, 
-                                                      u_int16_t classId, u_int16_t methodId){
-
+void SessionHandlerImpl::ConnectionHandlerImpl::close(
+    u_int16_t /*channel*/, u_int16_t /*replyCode*/, string& /*replyText*/, 
+    u_int16_t /*classId*/, u_int16_t /*methodId*/)
+{
     parent->client.getConnection().closeOk(0);
     parent->context->close();
 } 
         
-void SessionHandlerImpl::ConnectionHandlerImpl::closeOk(u_int16_t channel){
+void SessionHandlerImpl::ConnectionHandlerImpl::closeOk(u_int16_t /*channel*/){
     parent->context->close();
 } 
               
 
 
-void SessionHandlerImpl::ChannelHandlerImpl::open(u_int16_t channel, string& outOfBand){
+void SessionHandlerImpl::ChannelHandlerImpl::open(u_int16_t channel, string& /*outOfBand*/){
     parent->channels[channel] = new Channel(parent->context, channel, parent->framemax);
     parent->client.getChannel().openOk(channel);
 } 
         
-void SessionHandlerImpl::ChannelHandlerImpl::flow(u_int16_t channel, bool active){}         
-void SessionHandlerImpl::ChannelHandlerImpl::flowOk(u_int16_t channel, bool active){} 
+void SessionHandlerImpl::ChannelHandlerImpl::flow(u_int16_t /*channel*/, bool /*active*/){}         
+void SessionHandlerImpl::ChannelHandlerImpl::flowOk(u_int16_t /*channel*/, bool /*active*/){} 
         
-void SessionHandlerImpl::ChannelHandlerImpl::close(u_int16_t channel, u_int16_t replyCode, string& replyText, 
-                                                   u_int16_t classId, u_int16_t methodId){
+void SessionHandlerImpl::ChannelHandlerImpl::close(u_int16_t channel, u_int16_t /*replyCode*/, string& /*replyText*/, 
+                                                   u_int16_t /*classId*/, u_int16_t /*methodId*/){
     Channel* c = parent->getChannel(channel);
     if(c){
         parent->channels.erase(channel);
@@ -215,13 +216,13 @@
     }
 } 
         
-void SessionHandlerImpl::ChannelHandlerImpl::closeOk(u_int16_t channel){} 
+void SessionHandlerImpl::ChannelHandlerImpl::closeOk(u_int16_t /*channel*/){} 
               
 
 
-void SessionHandlerImpl::ExchangeHandlerImpl::declare(u_int16_t channel, u_int16_t ticket, string& exchange, string& type, 
-                                                      bool passive, bool durable, bool autoDelete, bool internal, bool nowait, 
-                                                      FieldTable& arguments){
+void SessionHandlerImpl::ExchangeHandlerImpl::declare(u_int16_t channel, u_int16_t /*ticket*/, string& exchange, string& type, 
+                                                      bool passive, bool /*durable*/, bool /*autoDelete*/, bool /*internal*/, bool nowait, 
+                                                      FieldTable& /*arguments*/){
 
     if(!passive && (
            type != TopicExchange::typeName &&
@@ -252,7 +253,7 @@
     }
 } 
         
-void SessionHandlerImpl::ExchangeHandlerImpl::delete_(u_int16_t channel, u_int16_t ticket, string& exchange, bool ifUnused, bool nowait){
+void SessionHandlerImpl::ExchangeHandlerImpl::delete_(u_int16_t channel, u_int16_t /*ticket*/, string& exchange, bool /*ifUnused*/, bool nowait){
     //TODO: implement unused
     parent->exchanges->getLock()->acquire();
     parent->exchanges->destroy(exchange);
@@ -260,9 +261,9 @@
     if(!nowait) parent->client.getExchange().deleteOk(channel);
 } 
 
-void SessionHandlerImpl::QueueHandlerImpl::declare(u_int16_t channel, u_int16_t ticket, string& name, 
+void SessionHandlerImpl::QueueHandlerImpl::declare(u_int16_t channel, u_int16_t /*ticket*/, string& name, 
                                                    bool passive, bool durable, bool exclusive, 
-                                                   bool autoDelete, bool nowait, FieldTable& arguments){
+                                                   bool autoDelete, bool nowait, FieldTable& /*arguments*/){
     Queue::shared_ptr queue;
     if (passive && !name.empty()) {
 	queue = parent->getQueue(name, channel);
@@ -290,7 +291,7 @@
     }
 } 
         
-void SessionHandlerImpl::QueueHandlerImpl::bind(u_int16_t channel, u_int16_t ticket, string& queueName, 
+void SessionHandlerImpl::QueueHandlerImpl::bind(u_int16_t channel, u_int16_t /*ticket*/, string& queueName, 
                                                 string& exchangeName, string& routingKey, bool nowait, 
                                                 FieldTable& arguments){
 
@@ -305,14 +306,14 @@
     }
 } 
         
-void SessionHandlerImpl::QueueHandlerImpl::purge(u_int16_t channel, u_int16_t ticket, string& queueName, bool nowait){
+void SessionHandlerImpl::QueueHandlerImpl::purge(u_int16_t channel, u_int16_t /*ticket*/, string& queueName, bool nowait){
 
     Queue::shared_ptr queue = parent->getQueue(queueName, channel);
     int count = queue->purge();
     if(!nowait) parent->client.getQueue().purgeOk(channel, count);
 } 
         
-void SessionHandlerImpl::QueueHandlerImpl::delete_(u_int16_t channel, u_int16_t ticket, string& queue, 
+void SessionHandlerImpl::QueueHandlerImpl::delete_(u_int16_t channel, u_int16_t /*ticket*/, string& queue, 
                                                    bool ifUnused, bool ifEmpty, bool nowait){
     ChannelException error(0, "");
     int count(0);
@@ -336,14 +337,14 @@
         
 
 
-void SessionHandlerImpl::BasicHandlerImpl::qos(u_int16_t channel, u_int32_t prefetchSize, u_int16_t prefetchCount, bool global){
+void SessionHandlerImpl::BasicHandlerImpl::qos(u_int16_t channel, u_int32_t prefetchSize, u_int16_t prefetchCount, bool /*global*/){
     //TODO: handle global
     parent->getChannel(channel)->setPrefetchSize(prefetchSize);
     parent->getChannel(channel)->setPrefetchCount(prefetchCount);
     parent->client.getBasic().qosOk(channel);
 } 
         
-void SessionHandlerImpl::BasicHandlerImpl::consume(u_int16_t channelId, u_int16_t ticket, 
+void SessionHandlerImpl::BasicHandlerImpl::consume(u_int16_t channelId, u_int16_t /*ticket*/, 
                                                    string& queueName, string& consumerTag, 
                                                    bool noLocal, bool noAck, bool exclusive, 
                                                    bool nowait){
@@ -372,7 +373,7 @@
     if(!nowait) parent->client.getBasic().cancelOk(channel, consumerTag);
 } 
         
-void SessionHandlerImpl::BasicHandlerImpl::publish(u_int16_t channel, u_int16_t ticket, 
+void SessionHandlerImpl::BasicHandlerImpl::publish(u_int16_t channel, u_int16_t /*ticket*/, 
                                                    string& exchange, string& routingKey, 
                                                    bool mandatory, bool immediate){
 
@@ -380,7 +381,7 @@
     parent->getChannel(channel)->handlePublish(msg);
 } 
         
-void SessionHandlerImpl::BasicHandlerImpl::get(u_int16_t channelId, u_int16_t ticket, string& queueName, bool noAck){
+void SessionHandlerImpl::BasicHandlerImpl::get(u_int16_t channelId, u_int16_t /*ticket*/, string& queueName, bool noAck){
     Queue::shared_ptr queue = parent->getQueue(queueName, channelId);    
     if(!parent->getChannel(channelId)->get(queue, !noAck)){
         string clusterId;//not used, part of an imatix hack
@@ -396,7 +397,7 @@
     }
 } 
         
-void SessionHandlerImpl::BasicHandlerImpl::reject(u_int16_t channel, u_int64_t deliveryTag, bool requeue){} 
+void SessionHandlerImpl::BasicHandlerImpl::reject(u_int16_t /*channel*/, u_int64_t /*deliveryTag*/, bool /*requeue*/){} 
         
 void SessionHandlerImpl::BasicHandlerImpl::recover(u_int16_t channel, bool requeue){
     parent->getChannel(channel)->recover(requeue);

Modified: incubator/qpid/trunk/qpid/cpp/broker/src/TopicExchange.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/broker/src/TopicExchange.cpp?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/broker/src/TopicExchange.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/broker/src/TopicExchange.cpp Wed Oct 11 08:50:15 2006
@@ -47,6 +47,7 @@
     for (Tokens::const_iterator i = p.begin(); i != p.end(); ++i) {
         hash += std::tr1::hash<std::string>()(*i);
     }
+    return hash;
 }
 
 TopicPattern& TopicPattern::operator=(const Tokens& tokens) {
@@ -119,7 +120,7 @@
     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 @@
     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::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)) {

Modified: incubator/qpid/trunk/qpid/cpp/broker/test/ChannelTest.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/broker/test/ChannelTest.cpp?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/broker/test/ChannelTest.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/broker/test/ChannelTest.cpp Wed Oct 11 08:50:15 2006
@@ -17,10 +17,7 @@
  */
 #include "Channel.h"
 #include "Message.h"
-#include <cppunit/TestCase.h>
-#include <cppunit/TextTestRunner.h>
-#include <cppunit/extensions/HelperMacros.h>
-#include <cppunit/plugin/TestPlugIn.h>
+#include <qpid_test_plugin.h>
 #include <iostream>
 #include <memory>
 

Modified: incubator/qpid/trunk/qpid/cpp/broker/test/HeadersExchangeTest.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/broker/test/HeadersExchangeTest.cpp?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/broker/test/HeadersExchangeTest.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/broker/test/HeadersExchangeTest.cpp Wed Oct 11 08:50:15 2006
@@ -19,10 +19,7 @@
 #include "HeadersExchange.h"
 #include "FieldTable.h"
 #include "Value.h"
-#include <cppunit/TestCase.h>
-#include <cppunit/TextTestRunner.h>
-#include <cppunit/extensions/HelperMacros.h>
-#include <cppunit/plugin/TestPlugIn.h>
+#include <qpid_test_plugin.h>
 
 using namespace qpid::broker;
 using namespace qpid::framing;

Modified: incubator/qpid/trunk/qpid/cpp/broker/test/QueueRegistryTest.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/broker/test/QueueRegistryTest.cpp?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/broker/test/QueueRegistryTest.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/broker/test/QueueRegistryTest.cpp Wed Oct 11 08:50:15 2006
@@ -1,8 +1,5 @@
 #include "QueueRegistry.h"
-#include <cppunit/TestCase.h>
-#include <cppunit/TextTestRunner.h>
-#include <cppunit/extensions/HelperMacros.h>
-#include <cppunit/plugin/TestPlugIn.h>
+#include <qpid_test_plugin.h>
 #include <string>
 
 using namespace qpid::broker;

Modified: incubator/qpid/trunk/qpid/cpp/broker/test/QueueTest.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/broker/test/QueueTest.cpp?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/broker/test/QueueTest.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/broker/test/QueueTest.cpp Wed Oct 11 08:50:15 2006
@@ -17,10 +17,7 @@
  */
 #include "Queue.h"
 #include "QueueRegistry.h"
-#include <cppunit/TestCase.h>
-#include <cppunit/TextTestRunner.h>
-#include <cppunit/extensions/HelperMacros.h>
-#include <cppunit/plugin/TestPlugIn.h>
+#include <qpid_test_plugin.h>
 #include <iostream>
 
 using namespace qpid::broker;

Modified: incubator/qpid/trunk/qpid/cpp/broker/test/RouterTest.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/broker/test/RouterTest.cpp?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/broker/test/RouterTest.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/broker/test/RouterTest.cpp Wed Oct 11 08:50:15 2006
@@ -20,10 +20,7 @@
 #include "ExchangeRegistry.h"
 #include "Message.h"
 #include "Router.h"
-#include <cppunit/TestCase.h>
-#include <cppunit/TextTestRunner.h>
-#include <cppunit/extensions/HelperMacros.h>
-#include <cppunit/plugin/TestPlugIn.h>
+#include <qpid_test_plugin.h>
 #include <iostream>
 #include <memory>
 
@@ -38,16 +35,14 @@
 
     TestExchange() : Exchange("test"), args(0) {}
     
-    void bind(Queue::shared_ptr queue, const string& routingKey, FieldTable* args){
-    }
+    void bind(Queue::shared_ptr /*queue*/, const string& /*routingKey*/, FieldTable* /*args*/){}
 
-    void unbind(Queue::shared_ptr queue, const string& routingKey, FieldTable* args){
-    }
+    void unbind(Queue::shared_ptr /*queue*/, const string& /*routingKey*/, FieldTable* /*args*/){ }
 
-    void route(Message::shared_ptr& msg, const string& routingKey, FieldTable* args){
-        this->msg = msg;
-        this->routingKey = routingKey;
-        this->args = args;
+    void route(Message::shared_ptr& _msg, const string& _routingKey, FieldTable* _args){
+        msg = _msg;
+        routingKey = _routingKey;
+        args = _args;
     }
 };
 

Modified: incubator/qpid/trunk/qpid/cpp/broker/test/TopicExchangeTest.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/broker/test/TopicExchangeTest.cpp?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/broker/test/TopicExchangeTest.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/broker/test/TopicExchangeTest.cpp Wed Oct 11 08:50:15 2006
@@ -1,8 +1,5 @@
 #include "TopicExchange.h"
-#include <cppunit/TestCase.h>
-#include <cppunit/TextTestRunner.h>
-#include <cppunit/extensions/HelperMacros.h>
-#include <cppunit/plugin/TestPlugIn.h>
+#include <qpid_test_plugin.h>
 
 using namespace qpid::broker;
 
@@ -30,6 +27,7 @@
     {
         out << '"' << *i << '"' << (i+1 == v.end() ? "]" : ", ");
     }
+    return out;
 }
 
 

Modified: incubator/qpid/trunk/qpid/cpp/broker/test/ValueTest.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/broker/test/ValueTest.cpp?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/broker/test/ValueTest.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/broker/test/ValueTest.cpp Wed Oct 11 08:50:15 2006
@@ -1,8 +1,5 @@
 #include "Value.h"
-#include <cppunit/TestCase.h>
-#include <cppunit/TextTestRunner.h>
-#include <cppunit/extensions/HelperMacros.h>
-#include <cppunit/plugin/TestPlugIn.h>
+#include <qpid_test_plugin.h>
 
 using namespace qpid::framing;
 

Modified: incubator/qpid/trunk/qpid/cpp/broker/test/exchange_test.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/broker/test/exchange_test.cpp?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/broker/test/exchange_test.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/broker/test/exchange_test.cpp Wed Oct 11 08:50:15 2006
@@ -20,10 +20,7 @@
 #include "Exchange.h"
 #include "Queue.h"
 #include "TopicExchange.h"
-#include <cppunit/TestCase.h>
-#include <cppunit/TextTestRunner.h>
-#include <cppunit/extensions/HelperMacros.h>
-#include <cppunit/plugin/TestPlugIn.h>
+#include <qpid_test_plugin.h>
 #include <iostream>
 
 using namespace qpid::broker;

Modified: incubator/qpid/trunk/qpid/cpp/broker/test/message_test.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/broker/test/message_test.cpp?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/broker/test/message_test.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/broker/test/message_test.cpp Wed Oct 11 08:50:15 2006
@@ -17,10 +17,7 @@
  */
 #include "APRBase.h"
 #include "Message.h"
-#include <cppunit/TestCase.h>
-#include <cppunit/TextTestRunner.h>
-#include <cppunit/extensions/HelperMacros.h>
-#include <cppunit/plugin/TestPlugIn.h>
+#include <qpid_test_plugin.h>
 #include <iostream>
 
 using namespace qpid::broker;

Modified: incubator/qpid/trunk/qpid/cpp/client/inc/IncomingMessage.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/client/inc/IncomingMessage.h?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/client/inc/IncomingMessage.h (original)
+++ incubator/qpid/trunk/qpid/cpp/client/inc/IncomingMessage.h Wed Oct 11 08:50:15 2006
@@ -35,7 +35,7 @@
 	qpid::framing::AMQHeaderBody::shared_ptr header;
 	std::vector<qpid::framing::AMQContentBody::shared_ptr> content;
 
-	long contentSize();
+	u_int64_t contentSize();
     public:
 	IncomingMessage(qpid::framing::BasicDeliverBody::shared_ptr intro);
 	IncomingMessage(qpid::framing::BasicReturnBody::shared_ptr intro);

Modified: incubator/qpid/trunk/qpid/cpp/client/inc/Message.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/client/inc/Message.h?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/client/inc/Message.h (original)
+++ incubator/qpid/trunk/qpid/cpp/client/inc/Message.h Wed Oct 11 08:50:15 2006
@@ -38,10 +38,10 @@
 	~Message();
 	
 	inline std::string getData(){ return data; }
-	inline void setData(const std::string& data){ this->data = data; }
+	inline void setData(const std::string& _data){ data = _data; }
 
 	inline bool isRedelivered(){ return redelivered; }
-	inline void setRedelivered(bool redelivered){ this->redelivered = redelivered; }
+	inline void setRedelivered(bool _redelivered){  redelivered = _redelivered; }
 
         inline u_int64_t getDeliveryTag(){ return deliveryTag; }
 

Modified: incubator/qpid/trunk/qpid/cpp/client/inc/MessageListener.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/client/inc/MessageListener.h?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/client/inc/MessageListener.h (original)
+++ incubator/qpid/trunk/qpid/cpp/client/inc/MessageListener.h Wed Oct 11 08:50:15 2006
@@ -27,6 +27,7 @@
 
     class MessageListener{
     public:
+        virtual ~MessageListener();
 	virtual void received(Message& msg) = 0;
     };
 

Modified: incubator/qpid/trunk/qpid/cpp/client/inc/ReturnedMessageHandler.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/client/inc/ReturnedMessageHandler.h?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/client/inc/ReturnedMessageHandler.h (original)
+++ incubator/qpid/trunk/qpid/cpp/client/inc/ReturnedMessageHandler.h Wed Oct 11 08:50:15 2006
@@ -27,6 +27,7 @@
 
     class ReturnedMessageHandler{
     public:
+        virtual ~ReturnedMessageHandler();
 	virtual void returned(Message& msg) = 0;
     };
 

Modified: incubator/qpid/trunk/qpid/cpp/client/src/Channel.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/client/src/Channel.cpp?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/client/src/Channel.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/client/src/Channel.cpp Wed Oct 11 08:50:15 2006
@@ -26,11 +26,16 @@
 using namespace qpid::framing;
 using namespace qpid::concurrent;
 
-Channel::Channel(bool _transactional, u_int16_t _prefetch) : id(0), incoming(0), con(0), out(0), 
-                                                             prefetch(_prefetch), 
-                                                             transactional(_transactional), 
-                                                             dispatcher(0),
-                                                             closed(true){
+Channel::Channel(bool _transactional, u_int16_t _prefetch) :
+    id(0),
+    con(0), 
+    dispatcher(0),
+    out(0), 
+    incoming(0),
+    closed(true),
+    prefetch(_prefetch), 
+    transactional(_transactional)
+{
     threadFactory = new ThreadFactoryImpl();
     dispatchMonitor = new MonitorImpl();
     retrievalMonitor = new MonitorImpl();
@@ -46,8 +51,8 @@
     delete threadFactory;
 }
 
-void Channel::setPrefetch(u_int16_t prefetch){
-    this->prefetch = prefetch;
+void Channel::setPrefetch(u_int16_t _prefetch){
+    prefetch = _prefetch;
     if(con != 0 && out != 0){
         setQos();
     }
@@ -114,7 +119,9 @@
 void Channel::bind(const Exchange& exchange, const Queue& queue, const std::string& key, const FieldTable& args, bool synch){
     string e = exchange.getName();
     string q = queue.getName();
-    AMQFrame*  frame = new AMQFrame(id, new QueueBindBody(0, q, e, (string&) key,!synch, (FieldTable&) args));
+    // TODO aconway 2006-10-10: not const correct, get rid of const_cast.
+    // 
+    AMQFrame*  frame = new AMQFrame(id, new QueueBindBody(0, q, e, key,!synch, const_cast<FieldTable&>(args)));
     if(synch){
         sendAndReceive(frame, queue_bind_ok);
     }else{
@@ -160,7 +167,6 @@
 }
 
 void Channel::cancelAll(){
-    int count(consumers.size());
     for(consumer_iterator i = consumers.begin(); i != consumers.end(); i = consumers.begin()){
         Consumer* c = i->second;
         if((c->ackMode == LAZY_ACK || c->ackMode == AUTO_ACK) && c->lastDeliveryTag > 0){
@@ -306,7 +312,7 @@
     }           
 }
     
-void Channel::handleHeartbeat(AMQHeartbeatBody::shared_ptr body){
+void Channel::handleHeartbeat(AMQHeartbeatBody::shared_ptr /*body*/){
     THROW_QPID_ERROR(PROTOCOL_ERROR + 504, "Channel received heartbeat");
 }
 

Modified: incubator/qpid/trunk/qpid/cpp/client/src/Connection.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/client/src/Connection.cpp?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/client/src/Connection.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/client/src/Connection.cpp Wed Oct 11 08:50:15 2006
@@ -37,9 +37,9 @@
     delete connector;
 }
 
-void Connection::open(const std::string& host, int port, const std::string& uid, const std::string& pwd, const std::string& virtualhost){
-    this->host = host;
-    this->port = port;
+void Connection::open(const std::string& _host, int _port, const std::string& uid, const std::string& pwd, const std::string& virtualhost){
+    host = _host;
+    port = _port;
     connector->setInputHandler(this);
     connector->setTimeoutHandler(this);
     connector->setShutdownHandler(this);
@@ -181,15 +181,15 @@
     }
 }
     
-void Connection::handleHeader(AMQHeaderBody::shared_ptr body){
+void Connection::handleHeader(AMQHeaderBody::shared_ptr /*body*/){
     error(504, "Channel error: received header body with channel 0.");
 }
     
-void Connection::handleContent(AMQContentBody::shared_ptr body){
+void Connection::handleContent(AMQContentBody::shared_ptr /*body*/){
     error(504, "Channel error: received content body with channel 0.");
 }
     
-void Connection::handleHeartbeat(AMQHeartbeatBody::shared_ptr body){
+void Connection::handleHeartbeat(AMQHeartbeatBody::shared_ptr /*body*/){
 }
 
 void Connection::sendAndReceive(AMQFrame* frame, const AMQMethodBody& body){
@@ -204,7 +204,7 @@
         std::cout << " [" << methodid << ":" << classid << "]";
     }
     std::cout << std::endl;
-    sendAndReceive(new AMQFrame(0, new ConnectionCloseBody(code, (string&) msg, classid, methodid)), connection_close_ok);
+    sendAndReceive(new AMQFrame(0, new ConnectionCloseBody(code, msg, classid, methodid)), connection_close_ok);
     connector->close();
 }
 

Modified: incubator/qpid/trunk/qpid/cpp/client/src/IncomingMessage.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/client/src/IncomingMessage.cpp?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/client/src/IncomingMessage.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/client/src/IncomingMessage.cpp Wed Oct 11 08:50:15 2006
@@ -29,12 +29,12 @@
 IncomingMessage::~IncomingMessage(){
 }
 
-void IncomingMessage::setHeader(AMQHeaderBody::shared_ptr header){
-    this->header = header;
+void IncomingMessage::setHeader(AMQHeaderBody::shared_ptr _header){
+    this->header = _header;
 }
 
-void IncomingMessage::addContent(AMQContentBody::shared_ptr content){
-    this->content.push_back(content);
+void IncomingMessage::addContent(AMQContentBody::shared_ptr _content){
+    this->content.push_back(_content);
 }
 
 bool IncomingMessage::isComplete(){
@@ -75,10 +75,10 @@
     }
 }
 
-long IncomingMessage::contentSize(){
-    long size(0);
-    int count(content.size());
-    for(int i = 0; i < count; i++){
+u_int64_t IncomingMessage::contentSize(){
+    u_int64_t size(0);
+    u_int64_t count(content.size());
+    for(u_int64_t i = 0; i < count; i++){
 	size += content[i]->size();
     }
     return size;

Added: incubator/qpid/trunk/qpid/cpp/client/src/MessageListener.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/client/src/MessageListener.cpp?view=auto&rev=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/client/src/MessageListener.cpp (added)
+++ incubator/qpid/trunk/qpid/cpp/client/src/MessageListener.cpp Wed Oct 11 08:50:15 2006
@@ -0,0 +1,21 @@
+/*
+ *
+ * Copyright (c) 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include "MessageListener.h"
+
+qpid::client::MessageListener::~MessageListener() {}

Propchange: incubator/qpid/trunk/qpid/cpp/client/src/MessageListener.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/qpid/trunk/qpid/cpp/client/src/Queue.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/client/src/Queue.cpp?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/client/src/Queue.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/client/src/Queue.cpp Wed Oct 11 08:50:15 2006
@@ -30,8 +30,8 @@
     return name;
 }
 
-void qpid::client::Queue::setName(const std::string& name){
-    this->name = name;
+void qpid::client::Queue::setName(const std::string& _name){
+    name = _name;
 }
 
 bool qpid::client::Queue::isAutoDelete() const{

Modified: incubator/qpid/trunk/qpid/cpp/client/src/ResponseHandler.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/client/src/ResponseHandler.cpp?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/client/src/ResponseHandler.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/client/src/ResponseHandler.cpp Wed Oct 11 08:50:15 2006
@@ -39,8 +39,8 @@
     monitor->release();
 }
 
-void qpid::client::ResponseHandler::signalResponse(qpid::framing::AMQMethodBody::shared_ptr response){
-    this->response = response;
+void qpid::client::ResponseHandler::signalResponse(qpid::framing::AMQMethodBody::shared_ptr _response){
+    response = _response;
     monitor->acquire();
     waiting = false;
     monitor->notify();

Added: incubator/qpid/trunk/qpid/cpp/client/src/ReturnedMessageHandler.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/client/src/ReturnedMessageHandler.cpp?view=auto&rev=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/client/src/ReturnedMessageHandler.cpp (added)
+++ incubator/qpid/trunk/qpid/cpp/client/src/ReturnedMessageHandler.cpp Wed Oct 11 08:50:15 2006
@@ -0,0 +1,21 @@
+/*
+ *
+ * Copyright (c) 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include "ReturnedMessageHandler.h"
+
+qpid::client::ReturnedMessageHandler::~ReturnedMessageHandler() {}

Propchange: incubator/qpid/trunk/qpid/cpp/client/src/ReturnedMessageHandler.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/qpid/trunk/qpid/cpp/client/test/client_test.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/client/test/client_test.cpp?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/client/test/client_test.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/client/test/client_test.cpp Wed Oct 11 08:50:15 2006
@@ -36,7 +36,7 @@
 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 @@
     }
 };
 
-int main(int argc, char** argv)
+int main(int argc, char**)
 {
     try{               
 	Connection con(argc > 1);

Modified: incubator/qpid/trunk/qpid/cpp/client/test/topic_listener.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/client/test/topic_listener.cpp?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/client/test/topic_listener.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/client/test/topic_listener.cpp Wed Oct 11 08:50:15 2006
@@ -125,11 +125,11 @@
 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();
     }

Modified: incubator/qpid/trunk/qpid/cpp/common/Makefile
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/common/Makefile?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/common/Makefile (original)
+++ incubator/qpid/trunk/qpid/cpp/common/Makefile Wed Oct 11 08:50:15 2006
@@ -20,11 +20,7 @@
 
 QPID_HOME=../..
 include $(QPID_HOME)/cpp/options.mk
-
 TARGET = $(LIB_DIR)/libqpid_common.so.1.0
-
-CXXFLAGS = $(DEBUG) $(OPT) -MMD -fpic $(COMMON_INCLUDES)
-
 SOURCES = $(wildcard */src/*.cpp framing/generated/*.cpp)
 OBJECTS = $(SOURCES:.cpp=.o)
 DEPS = $(SOURCES:.cpp=.d)

Modified: incubator/qpid/trunk/qpid/cpp/common/concurrent/inc/Runnable.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/common/concurrent/inc/Runnable.h?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/common/concurrent/inc/Runnable.h (original)
+++ incubator/qpid/trunk/qpid/cpp/common/concurrent/inc/Runnable.h Wed Oct 11 08:50:15 2006
@@ -24,6 +24,7 @@
     class Runnable
     {
     public:
+        virtual ~Runnable();
 	virtual void run() = 0;
     };
 

Modified: incubator/qpid/trunk/qpid/cpp/common/concurrent/src/APRBase.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/common/concurrent/src/APRBase.cpp?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/common/concurrent/src/APRBase.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/common/concurrent/src/APRBase.cpp Wed Oct 11 08:50:15 2006
@@ -91,7 +91,6 @@
 std::string qpid::concurrent::get_desc(apr_status_t status){
     const int size = 50;
     char tmp[size];
-    std::string msg(apr_strerror(status, tmp, size));
-    return msg;
+    return std::string(apr_strerror(status, tmp, size));
 }
 

Modified: incubator/qpid/trunk/qpid/cpp/common/concurrent/src/APRThread.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/common/concurrent/src/APRThread.cpp?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/common/concurrent/src/APRThread.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/common/concurrent/src/APRThread.cpp Wed Oct 11 08:50:15 2006
@@ -27,7 +27,7 @@
     return NULL;
 } 
 
-APRThread::APRThread(apr_pool_t* _pool, Runnable* _runnable) : pool(_pool), runnable(_runnable){}
+APRThread::APRThread(apr_pool_t* _pool, Runnable* _runnable) : runnable(_runnable), pool(_pool) {}
 
 APRThread::~APRThread(){
 }

Modified: incubator/qpid/trunk/qpid/cpp/common/concurrent/src/APRThreadPool.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/common/concurrent/src/APRThreadPool.cpp?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/common/concurrent/src/APRThreadPool.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/common/concurrent/src/APRThreadPool.cpp Wed Oct 11 08:50:15 2006
@@ -22,13 +22,11 @@
 
 using namespace qpid::concurrent;
 
-APRThreadPool::APRThreadPool(int _size) : size(_size), factory(new APRThreadFactory()), 
-                                          deleteFactory(true), running(false){
+APRThreadPool::APRThreadPool(int _size) : deleteFactory(true), size(_size), factory(new APRThreadFactory()), running(false){
     worker = new Worker(this);
 }
 
-APRThreadPool::APRThreadPool(int _size, ThreadFactory* _factory) : size(_size), factory(_factory), 
-                                                                   deleteFactory(false), running(false){
+APRThreadPool::APRThreadPool(int _size, ThreadFactory* _factory) :     deleteFactory(false), size(_size), factory(_factory), running(false){
     worker = new Worker(this);
 }
 

Added: incubator/qpid/trunk/qpid/cpp/common/concurrent/src/Runnable.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/common/concurrent/src/Runnable.cpp?view=auto&rev=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/common/concurrent/src/Runnable.cpp (added)
+++ incubator/qpid/trunk/qpid/cpp/common/concurrent/src/Runnable.cpp Wed Oct 11 08:50:15 2006
@@ -0,0 +1,19 @@
+/*
+ * Copyright (c) 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include "Runnable.h"
+qpid::concurrent::Runnable::~Runnable() {}

Propchange: incubator/qpid/trunk/qpid/cpp/common/concurrent/src/Runnable.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/qpid/trunk/qpid/cpp/common/framing/generated/stylesheets/amqp_client_handler_impl.xsl
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/common/framing/generated/stylesheets/amqp_client_handler_impl.xsl?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/common/framing/generated/stylesheets/amqp_client_handler_impl.xsl (original)
+++ incubator/qpid/trunk/qpid/cpp/common/framing/generated/stylesheets/amqp_client_handler_impl.xsl Wed Oct 11 08:50:15 2006
@@ -7,7 +7,7 @@
   ===============================
   Template: client_handler_impl_h
   ===============================
-  Template to generate the AMQP_ServerHandlerImpl class header file.
+  Template to generate the AMQP_ClientHandlerImpl class header file.
   -->
   <xsl:template match="amqp" mode="client_handler_impl_h">
     <xsl:param name="domain-cpp-table"/>
@@ -122,7 +122,7 @@
   =================================
   Template: client_handler_impl_cpp
   =================================
-  Template to generate the AMQP_ServerHandlerImpl class stubs.
+  Template to generate the AMQP_ClientHandlerImpl class stubs.
   -->
   <xsl:template match="amqp" mode="client_handler_impl_cpp">
     <xsl:param name="domain-cpp-table"/>
@@ -163,12 +163,12 @@
         <xsl:for-each select="method">
           <xsl:if test="chassis[@name='client']">
             <xsl:text>void AMQP_ClientHandlerImpl::</xsl:text><xsl:value-of select="$class"/><xsl:text>HandlerImpl::</xsl:text>
-            <xsl:value-of select="amqp:cpp-name(@name)"/><xsl:text>( u_int16_t channel</xsl:text>
+            <xsl:value-of select="amqp:cpp-name(@name)"/><xsl:text>( u_int16_t /*channel*/</xsl:text>
             <xsl:if test="field">
               <xsl:text>,&#xA;                        </xsl:text>
               <xsl:for-each select="field">
                 <xsl:variable name="domain-cpp-type" select="amqp:cpp-lookup(@domain, $domain-cpp-table)"/>
-                <xsl:value-of select="concat($domain-cpp-type, amqp:cpp-arg-ref($domain-cpp-type), ' ', amqp:cpp-name(@name))"/>
+                <xsl:value-of select="concat($domain-cpp-type, amqp:cpp-arg-ref($domain-cpp-type), ' /*', amqp:cpp-name(@name), '*/')"/>
                 <xsl:if test="position()!=last()">
                   <xsl:text>,&#xA;                        </xsl:text>
                 </xsl:if>

Modified: incubator/qpid/trunk/qpid/cpp/common/framing/generated/stylesheets/amqp_server_handler_impl.xsl
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/common/framing/generated/stylesheets/amqp_server_handler_impl.xsl?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/common/framing/generated/stylesheets/amqp_server_handler_impl.xsl (original)
+++ incubator/qpid/trunk/qpid/cpp/common/framing/generated/stylesheets/amqp_server_handler_impl.xsl Wed Oct 11 08:50:15 2006
@@ -163,12 +163,12 @@
         <xsl:for-each select="method">
           <xsl:if test="chassis[@name='server']">
             <xsl:text>void AMQP_ServerHandlerImpl::</xsl:text><xsl:value-of select="$class"/><xsl:text>HandlerImpl::</xsl:text>
-            <xsl:value-of select="amqp:cpp-name(@name)"/><xsl:text>( u_int16_t channel</xsl:text>
+            <xsl:value-of select="amqp:cpp-name(@name)"/><xsl:text>( u_int16_t /*channel*/</xsl:text>
             <xsl:if test="field">
               <xsl:text>,&#xA;                        </xsl:text>
               <xsl:for-each select="field">
                 <xsl:variable name="domain-cpp-type" select="amqp:cpp-lookup(@domain, $domain-cpp-table)"/>
-                <xsl:value-of select="concat($domain-cpp-type, amqp:cpp-arg-ref($domain-cpp-type), ' ', amqp:cpp-name(@name))"/>
+                <xsl:value-of select="concat($domain-cpp-type, amqp:cpp-arg-ref($domain-cpp-type), ' /*', amqp:cpp-name(@name), '*/')"/>
                 <xsl:if test="position()!=last()">
                   <xsl:text>,&#xA;                        </xsl:text>
                 </xsl:if>

Modified: incubator/qpid/trunk/qpid/cpp/common/framing/generated/stylesheets/amqp_server_operations.xsl
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/common/framing/generated/stylesheets/amqp_server_operations.xsl?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/common/framing/generated/stylesheets/amqp_server_operations.xsl (original)
+++ incubator/qpid/trunk/qpid/cpp/common/framing/generated/stylesheets/amqp_server_operations.xsl Wed Oct 11 08:50:15 2006
@@ -66,7 +66,7 @@
               <xsl:value-of select="amqp:process-docs(doc)"/>
               <xsl:text>*/&#xA;</xsl:text>
             </xsl:if>
-            <xsl:for-each select="rule">/**
+            <xsl:for-each select="rule">
               <xsl:text>&#xA;/**&#xA;</xsl:text>
               <xsl:text>Rule "</xsl:text><xsl:value-of select="@name"/><xsl:text>":&#xA;</xsl:text>
               <xsl:value-of select="amqp:process-docs(doc)"/>

Modified: incubator/qpid/trunk/qpid/cpp/common/framing/generated/stylesheets/cpp.xsl
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/common/framing/generated/stylesheets/cpp.xsl?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/common/framing/generated/stylesheets/cpp.xsl (original)
+++ incubator/qpid/trunk/qpid/cpp/common/framing/generated/stylesheets/cpp.xsl Wed Oct 11 08:50:15 2006
@@ -122,7 +122,7 @@
     }
     </xsl:if>
 
-    inline void encodeContent(Buffer&amp; buffer) const
+    inline void encodeContent(Buffer&amp; <xsl:if test="$f/field">buffer</xsl:if>) const
     {
         <xsl:if test="$f/field[@type='bit']">        
 	    u_int8_t flags = 0;
@@ -140,11 +140,8 @@
         </xsl:for-each>		 
     }
 
-    inline void decodeContent(Buffer&amp; buffer)
+    inline void decodeContent(Buffer&amp; <xsl:if test="$f/field">buffer</xsl:if>)
     {
-       <xsl:if test="$f/field[@type='bit']">
-	  u_int8_t maxbit = <xsl:value-of select="$f/@bit-field-count"/>;
-       </xsl:if>
         <xsl:for-each select="$f/field">
             <xsl:choose>
 		<xsl:when test="@type = 'bit' and @boolean-index = 1">

Modified: incubator/qpid/trunk/qpid/cpp/common/framing/inc/AMQHeaderBody.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/common/framing/inc/AMQHeaderBody.h?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/common/framing/inc/AMQHeaderBody.h (original)
+++ incubator/qpid/trunk/qpid/cpp/common/framing/inc/AMQHeaderBody.h Wed Oct 11 08:50:15 2006
@@ -42,7 +42,7 @@
     HeaderProperties* getProperties(){ return properties; }
     const HeaderProperties* getProperties() const { return properties; }
     inline u_int64_t getContentSize() const { return contentSize; }
-    inline void setContentSize(u_int64_t size) { contentSize = size; }
+    inline void setContentSize(u_int64_t _size) { contentSize = _size; }
     virtual ~AMQHeaderBody();
     virtual u_int32_t size() const;
     virtual void encode(Buffer& buffer) const;

Modified: incubator/qpid/trunk/qpid/cpp/common/framing/inc/AMQHeartbeatBody.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/common/framing/inc/AMQHeartbeatBody.h?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/common/framing/inc/AMQHeartbeatBody.h (original)
+++ incubator/qpid/trunk/qpid/cpp/common/framing/inc/AMQHeartbeatBody.h Wed Oct 11 08:50:15 2006
@@ -33,8 +33,8 @@
     virtual ~AMQHeartbeatBody();
     inline u_int32_t size() const { return 0; }
     inline u_int8_t type() const { return HEARTBEAT_BODY; }
-    inline void encode(Buffer& buffer) const {}
-    inline void decode(Buffer& buffer, u_int32_t size) {}
+    inline void encode(Buffer& ) const {}
+    inline void decode(Buffer& , u_int32_t /*size*/) {}
     virtual void print(std::ostream& out) const;
 };
 

Modified: incubator/qpid/trunk/qpid/cpp/common/framing/inc/BasicHeaderProperties.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/common/framing/inc/BasicHeaderProperties.h?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/common/framing/inc/BasicHeaderProperties.h (original)
+++ incubator/qpid/trunk/qpid/cpp/common/framing/inc/BasicHeaderProperties.h Wed Oct 11 08:50:15 2006
@@ -70,20 +70,20 @@
 	inline string& getAppId(){ return appId; }
 	inline string& getClusterId(){ return clusterId; }
 
-	void inline setContentType(string& type){ contentType = type; }
+	void inline setContentType(string& _type){ contentType = _type; }
 	void inline setContentEncoding(string& encoding){ contentEncoding = encoding; }
-	void inline setHeaders(FieldTable& headers){ this->headers = headers; }
+	void inline setHeaders(FieldTable& _headers){ headers = _headers; }
 	void inline setDeliveryMode(u_int8_t mode){ deliveryMode = mode; }
-	void inline setPriority(u_int8_t priority){ this->priority = priority; }
-	void inline setCorrelationId(string& correlationId){ this->correlationId = correlationId; }
-	void inline setReplyTo(string& replyTo){ this->replyTo = replyTo;}
-	void inline setExpiration(string&  expiration){ this->expiration = expiration; }
-	void inline setMessageId(string& messageId){ this->messageId = messageId; }
-	void inline setTimestamp(u_int64_t timestamp){ this->timestamp = timestamp; }
-	void inline setType(string& type){ this->type = type; }
-	void inline setUserId(string& userId){ this->userId = userId; }
-	void inline setAppId(string& appId){this->appId = appId; }
-	void inline setClusterId(string& clusterId){ this->clusterId = clusterId; }
+	void inline setPriority(u_int8_t _priority){ priority = _priority; }
+	void inline setCorrelationId(string& _correlationId){ correlationId = _correlationId; }
+	void inline setReplyTo(string& _replyTo){ replyTo = _replyTo;}
+	void inline setExpiration(string&  _expiration){ expiration = _expiration; }
+	void inline setMessageId(string& _messageId){ messageId = _messageId; }
+	void inline setTimestamp(u_int64_t _timestamp){ timestamp = _timestamp; }
+	void inline setType(string& _type){ type = _type; }
+	void inline setUserId(string& _userId){ userId = _userId; }
+	void inline setAppId(string& _appId){appId = _appId; }
+	void inline setClusterId(string& _clusterId){ clusterId = _clusterId; }
     };
 
 }

Modified: incubator/qpid/trunk/qpid/cpp/common/framing/inc/BodyHandler.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/common/framing/inc/BodyHandler.h?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/common/framing/inc/BodyHandler.h (original)
+++ incubator/qpid/trunk/qpid/cpp/common/framing/inc/BodyHandler.h Wed Oct 11 08:50:15 2006
@@ -30,6 +30,7 @@
 
     class BodyHandler{
     public:
+        virtual ~BodyHandler();
 	virtual void handleMethod(AMQMethodBody::shared_ptr body) = 0;
 	virtual void handleHeader(AMQHeaderBody::shared_ptr body) = 0;
 	virtual void handleContent(AMQContentBody::shared_ptr body) = 0;

Modified: incubator/qpid/trunk/qpid/cpp/common/framing/inc/Buffer.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/common/framing/inc/Buffer.h?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/common/framing/inc/Buffer.h (original)
+++ incubator/qpid/trunk/qpid/cpp/common/framing/inc/Buffer.h Wed Oct 11 08:50:15 2006
@@ -27,16 +27,16 @@
 
 class Buffer
 {
-    const int size;
+    const u_int32_t size;
     char* data;
-    int position;
-    int limit;
-    int r_position;
-    int r_limit;
+    u_int32_t position;
+    u_int32_t limit;
+    u_int32_t r_position;
+    u_int32_t r_limit;
 
 public:
 
-    Buffer(int size);
+    Buffer(u_int32_t size);
     ~Buffer();
 
     void flip();
@@ -44,9 +44,9 @@
     void compact();
     void record();
     void restore();
-    int available();
+    u_int32_t available();
     char* start();
-    void move(int bytes);
+    void move(u_int32_t bytes);
     
     void putOctet(u_int8_t i);
     void putShort(u_int16_t i);

Modified: incubator/qpid/trunk/qpid/cpp/common/framing/inc/InitiationHandler.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/common/framing/inc/InitiationHandler.h?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/common/framing/inc/InitiationHandler.h (original)
+++ incubator/qpid/trunk/qpid/cpp/common/framing/inc/InitiationHandler.h Wed Oct 11 08:50:15 2006
@@ -27,6 +27,7 @@
 
     class InitiationHandler{
     public:
+        virtual ~InitiationHandler();
 	virtual void initiated(ProtocolInitiation* header) = 0;
     };
 

Modified: incubator/qpid/trunk/qpid/cpp/common/framing/inc/InputHandler.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/common/framing/inc/InputHandler.h?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/common/framing/inc/InputHandler.h (original)
+++ incubator/qpid/trunk/qpid/cpp/common/framing/inc/InputHandler.h Wed Oct 11 08:50:15 2006
@@ -27,6 +27,7 @@
 
     class InputHandler{
     public:
+        virtual ~InputHandler();
 	virtual void received(AMQFrame* frame) = 0;
     };
 

Modified: incubator/qpid/trunk/qpid/cpp/common/framing/inc/OutputHandler.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/common/framing/inc/OutputHandler.h?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/common/framing/inc/OutputHandler.h (original)
+++ incubator/qpid/trunk/qpid/cpp/common/framing/inc/OutputHandler.h Wed Oct 11 08:50:15 2006
@@ -27,6 +27,7 @@
 
     class OutputHandler{
     public:
+        virtual ~OutputHandler();
 	virtual void send(AMQFrame* frame) = 0;
     };
 

Modified: incubator/qpid/trunk/qpid/cpp/common/framing/inc/Value.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/common/framing/inc/Value.h?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/common/framing/inc/Value.h (original)
+++ incubator/qpid/trunk/qpid/cpp/common/framing/inc/Value.h Wed Oct 11 08:50:15 2006
@@ -147,8 +147,8 @@
     ~EmptyValue();
     virtual u_int32_t size() const { return 0; }
     virtual char getType() const { return 0; }
-    virtual void encode(Buffer& buffer) {}
-    virtual void decode(Buffer& buffer) {}
+    virtual void encode(Buffer& ) {}
+    virtual void decode(Buffer& ) {}
     virtual bool operator==(const Value& v) const {
         return dynamic_cast<const EmptyValue*>(&v);
     }

Modified: incubator/qpid/trunk/qpid/cpp/common/framing/src/AMQContentBody.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/common/framing/src/AMQContentBody.cpp?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/common/framing/src/AMQContentBody.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/common/framing/src/AMQContentBody.cpp Wed Oct 11 08:50:15 2006
@@ -30,8 +30,8 @@
 void qpid::framing::AMQContentBody::encode(Buffer& buffer) const{
     buffer.putRawData(data);
 }
-void qpid::framing::AMQContentBody::decode(Buffer& buffer, u_int32_t size){
-    buffer.getRawData(data, size);
+void qpid::framing::AMQContentBody::decode(Buffer& buffer, u_int32_t _size){
+    buffer.getRawData(data, _size);
 }
 
 void qpid::framing::AMQContentBody::print(std::ostream& out) const

Modified: incubator/qpid/trunk/qpid/cpp/common/framing/src/AMQFrame.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/common/framing/src/AMQFrame.cpp?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/common/framing/src/AMQFrame.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/common/framing/src/AMQFrame.cpp Wed Oct 11 08:50:15 2006
@@ -63,33 +63,13 @@
 {    
     if(buffer.available() < 7) return false;
     buffer.record();
-    u_int8_t type = buffer.getOctet();
-    channel = buffer.getShort();
-    u_int32_t size = buffer.getLong();
-    if(buffer.available() < size + 1){
+    u_int32_t bufSize = decodeHead(buffer);
+
+    if(buffer.available() < bufSize + 1){
         buffer.restore();
         return false;
     }
-    switch(type)
-    {
-    case METHOD_BODY:
-	body = createMethodBody(buffer);
-	break;
-    case HEADER_BODY: 
-	body = AMQBody::shared_ptr(new AMQHeaderBody()); 
-	break;
-    case CONTENT_BODY: 
-	body = AMQBody::shared_ptr(new AMQContentBody()); 
-	break;
-    case HEARTBEAT_BODY: 
-	body = AMQBody::shared_ptr(new AMQHeartbeatBody()); 
-	break;
-    default:
-	string msg("Unknown body type: ");
-	msg += type;
-	THROW_QPID_ERROR(FRAMING_ERROR, msg);
-    }
-    body->decode(buffer, size);
+    decodeBody(buffer, bufSize);
     u_int8_t end = buffer.getOctet();
     if(end != 0xCE) THROW_QPID_ERROR(FRAMING_ERROR, "Frame end not found");
     return true;
@@ -101,7 +81,7 @@
     return buffer.getLong();
 }
 
-void AMQFrame::decodeBody(Buffer& buffer, uint32_t size)
+void AMQFrame::decodeBody(Buffer& buffer, uint32_t bufSize)
 {    
     switch(type)
     {
@@ -122,7 +102,7 @@
 	msg += type;
 	THROW_QPID_ERROR(FRAMING_ERROR, msg);
     }
-    body->decode(buffer, size);
+    body->decode(buffer, bufSize);
 }
 
 std::ostream& qpid::framing::operator<<(std::ostream& out, const AMQFrame& t){

Modified: incubator/qpid/trunk/qpid/cpp/common/framing/src/AMQHeaderBody.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/common/framing/src/AMQHeaderBody.cpp?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/common/framing/src/AMQHeaderBody.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/common/framing/src/AMQHeaderBody.cpp Wed Oct 11 08:50:15 2006
@@ -41,12 +41,12 @@
     properties->encode(buffer);
 }
 
-void qpid::framing::AMQHeaderBody::decode(Buffer& buffer, u_int32_t size){
+void qpid::framing::AMQHeaderBody::decode(Buffer& buffer, u_int32_t bufSize){
     u_int16_t classId = buffer.getShort();
     weight = buffer.getShort();
     contentSize = buffer.getLongLong();
     createProperties(classId);
-    properties->decode(buffer, size - 12);
+    properties->decode(buffer, bufSize - 12);
 }
 
 void qpid::framing::AMQHeaderBody::createProperties(int classId){

Modified: incubator/qpid/trunk/qpid/cpp/common/framing/src/AMQMethodBody.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/common/framing/src/AMQMethodBody.cpp?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/common/framing/src/AMQMethodBody.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/common/framing/src/AMQMethodBody.cpp Wed Oct 11 08:50:15 2006
@@ -24,7 +24,7 @@
     encodeContent(buffer);
 }
 
-void qpid::framing::AMQMethodBody::decode(Buffer& buffer, u_int32_t size){
+void qpid::framing::AMQMethodBody::decode(Buffer& buffer, u_int32_t /*size*/){
     decodeContent(buffer);
 }
 
@@ -32,7 +32,7 @@
     return other != 0 && other->amqpClassId() == amqpClassId() && other->amqpMethodId() == amqpMethodId();
 }
 
-void qpid::framing::AMQMethodBody::invoke(AMQP_ServerOperations& target, u_int16_t channel){
+void qpid::framing::AMQMethodBody::invoke(AMQP_ServerOperations& /*target*/, u_int16_t /*channel*/){
     THROW_QPID_ERROR(PROTOCOL_ERROR, "Method not supported by AMQP Server.");
 }
 

Modified: incubator/qpid/trunk/qpid/cpp/common/framing/src/BasicHeaderProperties.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/common/framing/src/BasicHeaderProperties.cpp?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/common/framing/src/BasicHeaderProperties.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/common/framing/src/BasicHeaderProperties.cpp Wed Oct 11 08:50:15 2006
@@ -23,23 +23,23 @@
 qpid::framing::BasicHeaderProperties::~BasicHeaderProperties(){}
 
 u_int32_t qpid::framing::BasicHeaderProperties::size() const{
-    u_int32_t size = 2;//flags
-    if(contentType.length() > 0) size += contentType.length() + 1;
-    if(contentEncoding.length() > 0) size += contentEncoding.length() + 1;
-    if(headers.count() > 0) size += headers.size();
-    if(deliveryMode != 0) size += 1;
-    if(priority != 0) size += 1;
-    if(correlationId.length() > 0) size += correlationId.length() + 1;
-    if(replyTo.length() > 0) size += replyTo.length() + 1;
-    if(expiration.length() > 0) size += expiration.length() + 1;
-    if(messageId.length() > 0) size += messageId.length() + 1;
-    if(timestamp != 0) size += 8;
-    if(type.length() > 0) size += type.length() + 1;
-    if(userId.length() > 0) size += userId.length() + 1;
-    if(appId.length() > 0) size += appId.length() + 1;
-    if(clusterId.length() > 0) size += clusterId.length() + 1;
+    u_int32_t bytes = 2;//flags
+    if(contentType.length() > 0) bytes += contentType.length() + 1;
+    if(contentEncoding.length() > 0) bytes += contentEncoding.length() + 1;
+    if(headers.count() > 0) bytes += headers.size();
+    if(deliveryMode != 0) bytes += 1;
+    if(priority != 0) bytes += 1;
+    if(correlationId.length() > 0) bytes += correlationId.length() + 1;
+    if(replyTo.length() > 0) bytes += replyTo.length() + 1;
+    if(expiration.length() > 0) bytes += expiration.length() + 1;
+    if(messageId.length() > 0) bytes += messageId.length() + 1;
+    if(timestamp != 0) bytes += 8;
+    if(type.length() > 0) bytes += type.length() + 1;
+    if(userId.length() > 0) bytes += userId.length() + 1;
+    if(appId.length() > 0) bytes += appId.length() + 1;
+    if(clusterId.length() > 0) bytes += clusterId.length() + 1;
 
-    return size;
+    return bytes;
 }
 
 void qpid::framing::BasicHeaderProperties::encode(qpid::framing::Buffer& buffer) const{
@@ -62,9 +62,8 @@
     if(clusterId.length() > 0) buffer.putShortString(clusterId);    
 }
 
-void qpid::framing::BasicHeaderProperties::decode(qpid::framing::Buffer& buffer, u_int32_t size){
+void qpid::framing::BasicHeaderProperties::decode(qpid::framing::Buffer& buffer, u_int32_t /*size*/){
     u_int16_t flags = buffer.getShort();
-    int shift = 15;
     if(flags & (1 << 15)) buffer.getShortString(contentType);
     if(flags & (1 << 14)) buffer.getShortString(contentEncoding);
     if(flags & (1 << 13)) buffer.getFieldTable(headers);
@@ -83,7 +82,6 @@
 
 u_int16_t qpid::framing::BasicHeaderProperties::getFlags() const{
     u_int16_t flags(0);
-    int shift = 15;
     if(contentType.length() > 0)     flags |= (1 << 15);
     if(contentEncoding.length() > 0) flags |= (1 << 14);
     if(headers.count() > 0)          flags |= (1 << 13);

Modified: incubator/qpid/trunk/qpid/cpp/common/framing/src/BodyHandler.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/common/framing/src/BodyHandler.cpp?view=diff&rev=462834&r1=462833&r2=462834
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/common/framing/src/BodyHandler.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/common/framing/src/BodyHandler.cpp Wed Oct 11 08:50:15 2006
@@ -21,6 +21,8 @@
 using namespace qpid::framing;
 using namespace std::tr1;
 
+BodyHandler::~BodyHandler() {}
+
 void BodyHandler::handleBody(AMQBody::shared_ptr& body){
 
     switch(body->type())