qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tr...@apache.org
Subject svn commit: r1104560 - in /qpid/trunk/qpid/cpp/src: qpid/broker/windows/ qpid/client/windows/ qpid/log/windows/ qpid/sys/windows/ qpid/types/ windows/
Date Tue, 17 May 2011 21:05:49 GMT
Author: tross
Date: Tue May 17 21:05:49 2011
New Revision: 1104560

URL: http://svn.apache.org/viewvc?rev=1104560&view=rev
Log:
QPID-2905 - Misc. code cleanup to allow compilation on a wider set of compilers.

Modified:
    qpid/trunk/qpid/cpp/src/qpid/broker/windows/SaslAuthenticator.cpp
    qpid/trunk/qpid/cpp/src/qpid/client/windows/SaslFactory.cpp
    qpid/trunk/qpid/cpp/src/qpid/log/windows/SinkOptions.cpp
    qpid/trunk/qpid/cpp/src/qpid/sys/windows/AsynchIoResult.h
    qpid/trunk/qpid/cpp/src/qpid/sys/windows/IocpPoller.cpp
    qpid/trunk/qpid/cpp/src/qpid/sys/windows/Shlib.cpp
    qpid/trunk/qpid/cpp/src/qpid/types/Variant.cpp
    qpid/trunk/qpid/cpp/src/windows/QpiddBroker.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/windows/SaslAuthenticator.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/windows/SaslAuthenticator.cpp?rev=1104560&r1=1104559&r2=1104560&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/windows/SaslAuthenticator.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/windows/SaslAuthenticator.cpp Tue May 17 21:05:49
2011
@@ -159,8 +159,11 @@ void SspiAuthenticator::start(const stri
     string::size_type j = response.find((char)0, i+1);
     string uid = response.substr(i+1, j-1);
     string pwd = response.substr(j+1);
+    string dot(".");
     int error = 0;
-    if (!LogonUser(uid.c_str(), ".", pwd.c_str(),
+    if (!LogonUser(const_cast<char*>(uid.c_str()),
+                   const_cast<char*>(dot.c_str()),
+                   const_cast<char*>(pwd.c_str()),
                    LOGON32_LOGON_NETWORK,
                    LOGON32_PROVIDER_DEFAULT,
                    &userToken))
@@ -176,7 +179,7 @@ void SspiAuthenticator::start(const stri
     client.tune(framing::CHANNEL_MAX, connection.getFrameMax(), 0, 0);
 }
         
-void SspiAuthenticator::step(const string& response)
+void SspiAuthenticator::step(const string& /*response*/)
 {
   QPID_LOG(info, "SASL: Need another step!!!");
 }

Modified: qpid/trunk/qpid/cpp/src/qpid/client/windows/SaslFactory.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/client/windows/SaslFactory.cpp?rev=1104560&r1=1104559&r2=1104560&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/client/windows/SaslFactory.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/client/windows/SaslFactory.cpp Tue May 17 21:05:49 2011
@@ -153,7 +153,7 @@ std::string WindowsSasl::start(const std
     return resp;
 }
 
-std::string WindowsSasl::step(const std::string& challenge)
+std::string WindowsSasl::step(const std::string& /*challenge*/)
 {
     // Shouldn't get this for PLAIN...
     throw InternalErrorException(QPID_MSG("Sasl step error"));
@@ -169,7 +169,7 @@ std::string WindowsSasl::getUserId()
     return std::string(); // TODO - when GSSAPI is supported, return userId for connection.
 }
 
-std::auto_ptr<SecurityLayer> WindowsSasl::getSecurityLayer(uint16_t maxFrameSize)
+std::auto_ptr<SecurityLayer> WindowsSasl::getSecurityLayer(uint16_t /*maxFrameSize*/)
 {
     return std::auto_ptr<SecurityLayer>(0);
 }

Modified: qpid/trunk/qpid/cpp/src/qpid/log/windows/SinkOptions.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/log/windows/SinkOptions.cpp?rev=1104560&r1=1104559&r2=1104560&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/log/windows/SinkOptions.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/log/windows/SinkOptions.cpp Tue May 17 21:05:49 2011
@@ -53,7 +53,7 @@ static int eventTypes[qpid::log::LevelTr
 
 class EventLogOutput : public qpid::log::Logger::Output {
 public:
-    EventLogOutput(const std::string& sourceName) : logHandle(0)
+    EventLogOutput(const std::string& /*sourceName*/) : logHandle(0)
     {
         logHandle = OpenEventLog(0, "Application");
     }
@@ -83,7 +83,7 @@ private:
     HANDLE logHandle;
 };
 
-SinkOptions::SinkOptions(const std::string& argv0)
+SinkOptions::SinkOptions(const std::string& /*argv0*/)
     : qpid::log::SinkOptions(),
       logToStderr(true),
       logToStdout(false),

Modified: qpid/trunk/qpid/cpp/src/qpid/sys/windows/AsynchIoResult.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/sys/windows/AsynchIoResult.h?rev=1104560&r1=1104559&r2=1104560&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/sys/windows/AsynchIoResult.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/sys/windows/AsynchIoResult.h Tue May 17 21:05:49 2011
@@ -98,7 +98,7 @@ private:
     // AcceptEx needs a place to write the local and remote addresses
     // when accepting the connection. Place those here; get enough for
     // IPv6 addresses, even if the socket is IPv4.
-    enum { SOCKADDRMAXLEN = sizeof sockaddr_in6 + 16,
+    enum { SOCKADDRMAXLEN = sizeof(sockaddr_in6) + 16,
            SOCKADDRBUFLEN = 2 * SOCKADDRMAXLEN };
     char addressBuffer[SOCKADDRBUFLEN];
 };

Modified: qpid/trunk/qpid/cpp/src/qpid/sys/windows/IocpPoller.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/sys/windows/IocpPoller.cpp?rev=1104560&r1=1104559&r2=1104560&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/sys/windows/IocpPoller.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/sys/windows/IocpPoller.cpp Tue May 17 21:05:49 2011
@@ -152,9 +152,9 @@ void Poller::monitorHandle(PollerHandle&
 }
 
 // All no-ops...
-void Poller::unmonitorHandle(PollerHandle& handle, Direction dir) {}
-void Poller::registerHandle(PollerHandle& handle) {}
-void Poller::unregisterHandle(PollerHandle& handle) {}
+void Poller::unmonitorHandle(PollerHandle& /*handle*/, Direction /*dir*/) {}
+void Poller::registerHandle(PollerHandle& /*handle*/) {}
+void Poller::unregisterHandle(PollerHandle& /*handle*/) {}
 
 Poller::Event Poller::wait(Duration timeout) {
     DWORD timeoutMs = 0;

Modified: qpid/trunk/qpid/cpp/src/qpid/sys/windows/Shlib.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/sys/windows/Shlib.cpp?rev=1104560&r1=1104559&r2=1104560&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/sys/windows/Shlib.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/sys/windows/Shlib.cpp Tue May 17 21:05:49 2011
@@ -44,7 +44,8 @@ void  Shlib::unload() {
 }
 
 void*  Shlib::getSymbol(const char* name) {
-    void* sym = GetProcAddress(static_cast<HMODULE>(handle), name);
+    // Double cast avoids warning about casting function pointer to object
+    void *sym = reinterpret_cast<void*>(reinterpret_cast<intptr_t>(GetProcAddress(static_cast<HMODULE>(handle),
name)));
     if (sym == NULL)
         throw QPID_WINDOWS_ERROR(GetLastError());
     return sym;

Modified: qpid/trunk/qpid/cpp/src/qpid/types/Variant.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/types/Variant.cpp?rev=1104560&r1=1104559&r2=1104560&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/types/Variant.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/types/Variant.cpp Tue May 17 21:05:49 2011
@@ -382,11 +382,11 @@ int8_t VariantImpl::asInt8() const
               return int8_t(value.ui16);
           break;
       case VAR_UINT32:
-          if (value.ui32 <= (uint) std::numeric_limits<int8_t>::max())
+          if (value.ui32 <= (uint32_t) std::numeric_limits<int8_t>::max())
               return int8_t(value.ui32);
           break;
       case VAR_UINT64:
-          if (value.ui64 <= (uint) std::numeric_limits<int8_t>::max())
+          if (value.ui64 <= (uint64_t) std::numeric_limits<int8_t>::max())
               return int8_t(value.ui64);
           break;
       case VAR_STRING: return convertFromString<int8_t>();
@@ -413,11 +413,11 @@ int16_t VariantImpl::asInt16() const
               return int16_t(value.ui16);
           break;
       case VAR_UINT32:
-          if (value.ui32 <= (uint) std::numeric_limits<int16_t>::max())
+          if (value.ui32 <= (uint32_t) std::numeric_limits<int16_t>::max())
               return int16_t(value.ui32);
           break;
       case VAR_UINT64:
-          if (value.ui64 <= (uint) std::numeric_limits<int16_t>::max())
+          if (value.ui64 <= (uint64_t) std::numeric_limits<int16_t>::max())
               return int16_t(value.ui64);
           break;
       case VAR_STRING: return convertFromString<int16_t>();
@@ -442,7 +442,7 @@ int32_t VariantImpl::asInt32() const
               return int32_t(value.ui32);
           break;
       case VAR_UINT64:
-        if (value.ui64 <= (uint32_t) std::numeric_limits<int32_t>::max())
+        if (value.ui64 <= (uint64_t) std::numeric_limits<int32_t>::max())
               return int32_t(value.ui64);
           break;
       case VAR_STRING: return convertFromString<int32_t>();

Modified: qpid/trunk/qpid/cpp/src/windows/QpiddBroker.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/windows/QpiddBroker.cpp?rev=1104560&r1=1104559&r2=1104560&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/windows/QpiddBroker.cpp (original)
+++ qpid/trunk/qpid/cpp/src/windows/QpiddBroker.cpp Tue May 17 21:05:49 2011
@@ -155,7 +155,7 @@ NamedSharedMemory<T>::NamedSharedMemory(
     name(n),
     memory(NULL),
     data(0)
-{};
+{}
 
 template <typename T>
 NamedSharedMemory<T>::~NamedSharedMemory() {
@@ -163,7 +163,7 @@ NamedSharedMemory<T>::~NamedSharedMemory
         ::UnmapViewOfFile(data);
     if (memory != NULL)
         ::CloseHandle(memory);
-};
+}
 
 template <typename T>
 T& NamedSharedMemory<T>::create() {



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message