You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gs...@apache.org on 2008/07/25 11:04:27 UTC

svn commit: r679717 - in /incubator/qpid/trunk/qpid/cpp/src: qpid/broker/SaslAuthenticator.cpp qpid/framing/Blob.h tests/InlineVector.cpp

Author: gsim
Date: Fri Jul 25 02:04:26 2008
New Revision: 679717

URL: http://svn.apache.org/viewvc?rev=679717&view=rev
Log:
QPID-1154, QPID-1155 & QPID-1156: Patches from Steve Huston to fix various minor compiler errors.


Modified:
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SaslAuthenticator.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/framing/Blob.h
    incubator/qpid/trunk/qpid/cpp/src/tests/InlineVector.cpp

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SaslAuthenticator.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SaslAuthenticator.cpp?rev=679717&r1=679716&r2=679717&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SaslAuthenticator.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SaslAuthenticator.cpp Fri Jul 25 02:04:26 2008
@@ -234,9 +234,10 @@
             throw ConnectionForcedException("Authenticated username unavailable");
         }
 
-        QPID_LOG(info, "SASL: Authentication succeeded for: " << (char *)uid);
+        QPID_LOG(info, "SASL: Authentication succeeded for: "
+                 << const_cast<char*>(static_cast<const char*>(uid)));
 
-        connection.setUserId((char *)uid);
+        connection.setUserId(const_cast<char*>(static_cast<const char*>(uid)));
 
         client.tune(framing::CHANNEL_MAX, connection.getFrameMax(), 0, 0);
     } else if (SASL_CONTINUE == code) {

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/framing/Blob.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/framing/Blob.h?rev=679717&r1=679716&r2=679717&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/framing/Blob.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/framing/Blob.h Fri Jul 25 02:04:26 2008
@@ -130,7 +130,7 @@
         copy = b.copy;
         destroy = b.destroy;
         basePtr = reinterpret_cast<BaseType*>(
-            ((char*)this)+ ((char*)(b.basePtr) - (char*)(&b)));
+            ((char*)this)+ ((const char*)(b.basePtr) - (const char*)(&b)));
     }
 
   public:

Modified: incubator/qpid/trunk/qpid/cpp/src/tests/InlineVector.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/InlineVector.cpp?rev=679717&r1=679716&r2=679717&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/InlineVector.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/InlineVector.cpp Fri Jul 25 02:04:26 2008
@@ -30,8 +30,8 @@
 typedef InlineVector<int, 3> 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) {