From 70ee30d900ab5df4631c082c24ddf3cfddc67a97 Mon Sep 17 00:00:00 2001 From: aconway Date: Thu, 5 Mar 2015 22:32:00 +0000 Subject: QPID-6427: Problem building trunk qpid cpp on RHEL 5 Fixed a couple of legitimate compiler warnings, worked around a couple of compiler weaknesses. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1664517 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/qpid/broker/amqp/Session.cpp | 4 ++-- qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp | 4 ++-- qpid/cpp/src/qpid/messaging/amqp/ReceiverContext.h | 2 +- qpid/cpp/src/qpid/messaging/amqp/SenderContext.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'qpid/cpp') diff --git a/qpid/cpp/src/qpid/broker/amqp/Session.cpp b/qpid/cpp/src/qpid/broker/amqp/Session.cpp index 3b65e6a64d..9cd6aae26f 100644 --- a/qpid/cpp/src/qpid/broker/amqp/Session.cpp +++ b/qpid/cpp/src/qpid/broker/amqp/Session.cpp @@ -835,7 +835,7 @@ void Session::abort() tx.dischargeComplete(); tx.buffer->rollback(); txAborted(); - tx.buffer.reset(); + tx.buffer = boost::intrusive_ptr(); QPID_LOG(debug, "Transaction " << tx.id << " rolled back"); } } @@ -848,7 +848,7 @@ void Session::committed(bool sync) if (tx.buffer.get()) { tx.buffer->endCommit(&connection.getBroker().getStore()); txCommitted(); - tx.buffer.reset(); + tx.buffer = boost::intrusive_ptr(); QPID_LOG(debug, "Transaction " << tx.id << " comitted"); } else { throw Exception(qpid::amqp::error_conditions::transaction::ROLLBACK, "tranaction vanished during async commit"); diff --git a/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp b/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp index d4a7b60e3c..0c516311da 100644 --- a/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp +++ b/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp @@ -230,7 +230,7 @@ void ConnectionContext::close() } if (ticker) { ticker->cancel(); - ticker.reset(); + ticker = boost::intrusive_ptr(); } } @@ -1236,7 +1236,7 @@ void ConnectionContext::startTxSession(boost::shared_ptr session QPID_LOG(debug, id << " attaching transaction for " << session->getName()); boost::shared_ptr tx(new Transaction(session->session)); session->transaction = tx; - attach(session, tx); + attach(session, boost::shared_ptr(tx)); tx->declare(boost::bind(&ConnectionContext::send, this, _1, _2, _3, _4, _5), session); } catch (const Exception& e) { throw TransactionError(Msg() << "Cannot start transaction: " << e.what()); diff --git a/qpid/cpp/src/qpid/messaging/amqp/ReceiverContext.h b/qpid/cpp/src/qpid/messaging/amqp/ReceiverContext.h index 2b4e8e1986..dd1352aecb 100644 --- a/qpid/cpp/src/qpid/messaging/amqp/ReceiverContext.h +++ b/qpid/cpp/src/qpid/messaging/amqp/ReceiverContext.h @@ -46,7 +46,7 @@ class ReceiverContext { public: ReceiverContext(pn_session_t* session, const std::string& name, const qpid::messaging::Address& source); - ~ReceiverContext(); + virtual ~ReceiverContext(); void reset(pn_session_t* session); void setCapacity(uint32_t); uint32_t getCapacity(); diff --git a/qpid/cpp/src/qpid/messaging/amqp/SenderContext.h b/qpid/cpp/src/qpid/messaging/amqp/SenderContext.h index 4d3c4bee79..467a8e0d3d 100644 --- a/qpid/cpp/src/qpid/messaging/amqp/SenderContext.h +++ b/qpid/cpp/src/qpid/messaging/amqp/SenderContext.h @@ -76,7 +76,7 @@ class SenderContext const qpid::messaging::Address& target, bool setToOnSend, const CoordinatorPtr& transaction = CoordinatorPtr()); - ~SenderContext(); + virtual ~SenderContext(); virtual void reset(pn_session_t* session); virtual void close(); -- cgit v1.2.1