From 6c19bc243f95fff6754624cbbcf7c73cf0a7a37c Mon Sep 17 00:00:00 2001 From: Ted Ross Date: Tue, 17 May 2011 21:05:49 +0000 Subject: QPID-2905 - Misc. code cleanup to allow compilation on a wider set of compilers. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1104560 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/sys/windows/AsynchIoResult.h | 2 +- cpp/src/qpid/sys/windows/IocpPoller.cpp | 6 +++--- cpp/src/qpid/sys/windows/Shlib.cpp | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) (limited to 'cpp/src/qpid/sys/windows') diff --git a/cpp/src/qpid/sys/windows/AsynchIoResult.h b/cpp/src/qpid/sys/windows/AsynchIoResult.h index 66c89efc11..b11324918b 100755 --- a/cpp/src/qpid/sys/windows/AsynchIoResult.h +++ b/cpp/src/qpid/sys/windows/AsynchIoResult.h @@ -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]; }; diff --git a/cpp/src/qpid/sys/windows/IocpPoller.cpp b/cpp/src/qpid/sys/windows/IocpPoller.cpp index d326ab02ac..1805dd2cd8 100755 --- a/cpp/src/qpid/sys/windows/IocpPoller.cpp +++ b/cpp/src/qpid/sys/windows/IocpPoller.cpp @@ -152,9 +152,9 @@ void Poller::monitorHandle(PollerHandle& handle, Direction dir) { } // 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; diff --git a/cpp/src/qpid/sys/windows/Shlib.cpp b/cpp/src/qpid/sys/windows/Shlib.cpp index 38027de93f..ba18747eb4 100644 --- a/cpp/src/qpid/sys/windows/Shlib.cpp +++ b/cpp/src/qpid/sys/windows/Shlib.cpp @@ -44,7 +44,8 @@ void Shlib::unload() { } void* Shlib::getSymbol(const char* name) { - void* sym = GetProcAddress(static_cast(handle), name); + // Double cast avoids warning about casting function pointer to object + void *sym = reinterpret_cast(reinterpret_cast(GetProcAddress(static_cast(handle), name))); if (sym == NULL) throw QPID_WINDOWS_ERROR(GetLastError()); return sym; -- cgit v1.2.1