Solve it by casting to the larger of the two, i.e. 64-bit.
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)
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;
}