]> source.dussan.org Git - tigervnc.git/commitdiff
LPARAM and WPARAM have different types on Win32 and Win64
authorPierre Ossman <ossman@cendio.se>
Tue, 3 Mar 2015 15:46:19 +0000 (16:46 +0100)
committerPierre Ossman <ossman@cendio.se>
Tue, 3 Mar 2015 15:46:19 +0000 (16:46 +0100)
Solve it by casting to the larger of the two, i.e. 64-bit.

win/rfb_win32/Clipboard.cxx
win/rfb_win32/WMShatter.cxx

index 70f52ad4dc28ecead73474c98f29d5a81d52c6e8..0e2906236515a44b417bc44ace7d8052b20370cc 100644 (file)
@@ -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)
index e68abfb163d4a89820e0f7ae7235e26b397188df..687deda209ef56237801904acf69ea82b8b9f672 100644 (file)
@@ -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;
 }