Use correct type for format string
diff --git a/win/rfb_win32/WMHooks.cxx b/win/rfb_win32/WMHooks.cxx
index d59a9ce..2a3da0d 100644
--- a/win/rfb_win32/WMHooks.cxx
+++ b/win/rfb_win32/WMHooks.cxx
@@ -265,7 +265,9 @@
       NotifyHooksCursor((HCURSOR)msg.lParam);
 #ifdef _DEBUG
     } else if (msg.message == diagnosticMsg) {
-      vlog.info("DIAG msg=%x(%d) wnd=%lx", msg.wParam, msg.wParam, msg.lParam);
+      vlog.info("DIAG msg=%x(%d) wnd=%lx",
+                (unsigned)msg.wParam, (int)msg.wParam,
+                (unsigned long)msg.lParam);
 #endif
     }
   }