From 40e3ceb007f58a78dde0b54e1c1946c741a3e0d5 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Tue, 3 Mar 2015 16:46:19 +0100 Subject: [PATCH] LPARAM and WPARAM have different types on Win32 and Win64 Solve it by casting to the larger of the two, i.e. 64-bit. --- win/rfb_win32/Clipboard.cxx | 3 ++- win/rfb_win32/WMShatter.cxx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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; } -- 2.39.5