From: Pierre Ossman Date: Tue, 3 Mar 2015 15:46:19 +0000 (+0100) Subject: LPARAM and WPARAM have different types on Win32 and Win64 X-Git-Tag: v1.4.90~33^2~8 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=40e3ceb007f58a78dde0b54e1c1946c741a3e0d5;p=tigervnc.git LPARAM and WPARAM have different types on Win32 and Win64 Solve it by casting to the larger of the two, i.e. 64-bit. --- diff --git a/win/rfb_win32/Clipboard.cxx b/win/rfb_win32/Clipboard.cxx index 70f52ad4..0e290623 100644 --- a/win/rfb_win32/Clipboard.cxx +++ b/win/rfb_win32/Clipboard.cxx @@ -96,7 +96,8 @@ Clipboard::processMessage(UINT msg, WPARAM wParam, LPARAM lParam) { switch (msg) { case WM_CHANGECBCHAIN: - vlog.debug("change clipboard chain (%x, %x)", wParam, lParam); + vlog.debug("change clipboard chain (%I64x, %I64x)", + (long long)wParam, (long long)lParam); if ((HWND) wParam == next_window) next_window = (HWND) lParam; else if (next_window != 0) diff --git a/win/rfb_win32/WMShatter.cxx b/win/rfb_win32/WMShatter.cxx index e68abfb1..687deda2 100644 --- a/win/rfb_win32/WMShatter.cxx +++ b/win/rfb_win32/WMShatter.cxx @@ -37,7 +37,8 @@ rfb::win32::IsSafeWM(HWND window, UINT msg, WPARAM wParam, LPARAM lParam) { break; }; if (!result) { - vlog.info("IsSafeWM: 0x%x received 0x%x(%u, %lu) - not safe", window, msg, wParam, lParam); + vlog.info("IsSafeWM: 0x%p received 0x%x(%I64u, %I64u) - not safe", + window, msg, (long long)wParam, (long long)lParam); } return result; }