From 2ebd5155bdf88bdb3fbc76fbf7e9fdc9765133d6 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 12 Mar 2019 19:37:35 +0300 Subject: fixes for format specifiers --- src/mir_app/src/netlibbind.cpp | 10 +++++----- src/mir_core/src/threads.cpp | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/mir_app/src/netlibbind.cpp b/src/mir_app/src/netlibbind.cpp index 1d06b70e9f..a6152adf09 100644 --- a/src/mir_app/src/netlibbind.cpp +++ b/src/mir_app/src/netlibbind.cpp @@ -141,7 +141,7 @@ static void __cdecl NetlibBindAcceptThread(NetlibBoundPort *nlbp) if (nlbp->s6 != INVALID_SOCKET) FD_SET(nlbp->s6, &r); if (select(0, &r, nullptr, nullptr, nullptr) == SOCKET_ERROR) { - Netlib_Logf(nlbp->nlu, "NetlibBindAcceptThread (%p): select failed (%d)", nlbp->s, GetLastError()); + Netlib_Logf(nlbp->nlu, "NetlibBindAcceptThread (%p): select failed (%d)", (void*)nlbp->s, GetLastError()); break; } @@ -153,20 +153,20 @@ static void __cdecl NetlibBindAcceptThread(NetlibBoundPort *nlbp) if (FD_ISSET(nlbp->s, &r)) { s = accept(nlbp->s, (sockaddr*)&sin, &sinLen); if (s == INVALID_SOCKET) { - Netlib_Logf(nlbp->nlu, "NetlibBindAcceptThread (%p): accept V4 failed (%d)", nlbp->s, GetLastError()); + Netlib_Logf(nlbp->nlu, "NetlibBindAcceptThread (%p): accept V4 failed (%d)", (void*)nlbp->s, GetLastError()); break; } } else if (FD_ISSET(nlbp->s6, &r)) { s = accept(nlbp->s6, (sockaddr*)&sin, &sinLen); if (s == INVALID_SOCKET) { - Netlib_Logf(nlbp->nlu, "NetlibBindAcceptThread (%p): accept V6 failed (%d)", nlbp->s, GetLastError()); + Netlib_Logf(nlbp->nlu, "NetlibBindAcceptThread (%p): accept V6 failed (%d)", (void*)nlbp->s, GetLastError()); break; } } else s = 0; - Netlib_Logf(nlbp->nlu, "New incoming connection on port %u from %s (%p)", nlbp->wPort, ptrA(Netlib_AddressToString(&sin)), s); + Netlib_Logf(nlbp->nlu, "New incoming connection on port %u from %s (%p)", nlbp->wPort, ptrA(Netlib_AddressToString(&sin)), (void*)s); NetlibConnection *nlc = new NetlibConnection(); nlc->nlu = nlbp->nlu; @@ -179,7 +179,7 @@ static void __cdecl NetlibBindAcceptThread(NetlibBoundPort *nlbp) NetlibUPnPDeletePortMapping(nlbp->wExPort, "TCP"); nlbp->hThread = nullptr; - Netlib_Logf(nlbp->nlu, "NetlibBindAcceptThread: (%p) thread for port %u closed", nlbp->s, nlbp->wPort); + Netlib_Logf(nlbp->nlu, "NetlibBindAcceptThread: (%p) thread for port %u closed", (void*)nlbp->s, nlbp->wPort); } MIR_APP_DLL(HNETLIBBIND) Netlib_BindPort(HNETLIBUSER nlu, NETLIBBIND *nlb) diff --git a/src/mir_core/src/threads.cpp b/src/mir_core/src/threads.cpp index ce108e4ac9..713c0eaaa7 100644 --- a/src/mir_core/src/threads.cpp +++ b/src/mir_core/src/threads.cpp @@ -235,7 +235,7 @@ static void __cdecl KillObjectThreadsWorker(void* owner) if (it->pObject == owner) { char szModuleName[MAX_PATH]; GetModuleFileNameA(it->hOwner, szModuleName, sizeof(szModuleName)); - Netlib_Logf(nullptr, "Killing object thread %s:%p", szModuleName, it->dwThreadId); + Netlib_Logf(nullptr, "Killing object thread %s:%08x", szModuleName, it->dwThreadId); TerminateThread(it->hThread, 9999); CloseHandle(it->hThread); mir_free(it); @@ -272,7 +272,7 @@ static void CALLBACK KillAllThreads(HWND, UINT, UINT_PTR, DWORD) for (auto &p : threads) { char szModuleName[MAX_PATH]; GetModuleFileNameA(p->hOwner, szModuleName, sizeof(szModuleName)); - Netlib_Logf(nullptr, "Killing thread %s:%p (%p)", szModuleName, p->dwThreadId, p->pEntryPoint); + Netlib_Logf(nullptr, "Killing thread %s:%08x (%p)", szModuleName, p->dwThreadId, p->pEntryPoint); TerminateThread(p->hThread, 9999); CloseHandle(p->hThread); mir_free(p); -- cgit v1.2.3