From 0ba523ca249b8f7f46d3c113b991cf880ce9eb9a Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Fri, 25 Jul 2008 09:04:26 +0000 Subject: QPID-1154, QPID-1155 & QPID-1156: Patches from Steve Huston to fix various minor compiler errors. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@679717 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/qpid/broker/SaslAuthenticator.cpp | 5 +++-- qpid/cpp/src/qpid/framing/Blob.h | 2 +- qpid/cpp/src/tests/InlineVector.cpp | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) (limited to 'qpid/cpp/src') diff --git a/qpid/cpp/src/qpid/broker/SaslAuthenticator.cpp b/qpid/cpp/src/qpid/broker/SaslAuthenticator.cpp index a542211147..136cf6f785 100644 --- a/qpid/cpp/src/qpid/broker/SaslAuthenticator.cpp +++ b/qpid/cpp/src/qpid/broker/SaslAuthenticator.cpp @@ -234,9 +234,10 @@ void CyrusAuthenticator::processAuthenticationStep(int code, const char *challen throw ConnectionForcedException("Authenticated username unavailable"); } - QPID_LOG(info, "SASL: Authentication succeeded for: " << (char *)uid); + QPID_LOG(info, "SASL: Authentication succeeded for: " + << const_cast(static_cast(uid))); - connection.setUserId((char *)uid); + connection.setUserId(const_cast(static_cast(uid))); client.tune(framing::CHANNEL_MAX, connection.getFrameMax(), 0, 0); } else if (SASL_CONTINUE == code) { diff --git a/qpid/cpp/src/qpid/framing/Blob.h b/qpid/cpp/src/qpid/framing/Blob.h index 7cf4cefc3b..5c84384ad7 100644 --- a/qpid/cpp/src/qpid/framing/Blob.h +++ b/qpid/cpp/src/qpid/framing/Blob.h @@ -130,7 +130,7 @@ class Blob copy = b.copy; destroy = b.destroy; basePtr = reinterpret_cast( - ((char*)this)+ ((char*)(b.basePtr) - (char*)(&b))); + ((char*)this)+ ((const char*)(b.basePtr) - (const char*)(&b))); } public: diff --git a/qpid/cpp/src/tests/InlineVector.cpp b/qpid/cpp/src/tests/InlineVector.cpp index 7add920cb2..bcd36e47b4 100644 --- a/qpid/cpp/src/tests/InlineVector.cpp +++ b/qpid/cpp/src/tests/InlineVector.cpp @@ -30,8 +30,8 @@ using namespace std; typedef InlineVector Vec; bool isInline(const Vec& v) { - return (char*)&v <= (char*)(&v[0]) && - (char*)(&v[0]) < (char*)&v+sizeof(v); + return (const char*)&v <= (const char*)(&v[0]) && + (const char*)(&v[0]) < (const char*)&v+sizeof(v); } QPID_AUTO_TEST_CASE(testCtor) { -- cgit v1.2.1