ref: edcf839d4c557c3993d681665829390697353344
parent: 8ea15f3b3525d2ef5341f8122871c4f0ff77260a
author: Simon Tatham <[email protected]>
date: Sun Oct 1 10:50:58 EDT 2017
Fix an int->pointer cast warning in windows.c. If I increase clang-cl's warning pickiness, it starts objecting to my cast to HMENU from a (potentially, in 64 bits) smaller integer type. Actually I don't think there's a problem there - all the integer ids I cast to HMENU are nice small numbers and a widening cast is just fine. But I can suppress the warning by using INT_PTR instead of int in the prototype for mkctrl, so it's easiest just to do that.
--- a/windows.c
+++ b/windows.c
@@ -2140,7 +2140,7 @@
/* Control coordinates should be specified in dialog units. */
HWND mkctrl(frontend *fe, int x1, int x2, int y1, int y2,
LPCTSTR wclass, int wstyle,
- int exstyle, const char *wtext, int wid)
+ int exstyle, const char *wtext, INT_PTR wid)
{
RECT rc;
TCHAR wwtext[256];
@@ -2349,7 +2349,7 @@
#ifndef _WIN32_WCE
HWND mkctrl(frontend *fe, int x1, int x2, int y1, int y2,
char *wclass, int wstyle,
- int exstyle, const char *wtext, int wid)
+ int exstyle, const char *wtext, INT_PTR wid)
{
HWND ret;
ret = CreateWindowEx(exstyle, wclass, wtext,