aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2017-10-01 14:50:58 +0100
committerSimon Tatham <anakin@pobox.com>2017-10-01 15:18:14 +0100
commitedcf839d4c557c3993d681665829390697353344 (patch)
tree50ba8ea86e0b499153e54f78ca3fe94283f51e90
parent8ea15f3b3525d2ef5341f8122871c4f0ff77260a (diff)
downloadpuzzles-edcf839d4c557c3993d681665829390697353344.zip
puzzles-edcf839d4c557c3993d681665829390697353344.tar.gz
puzzles-edcf839d4c557c3993d681665829390697353344.tar.bz2
puzzles-edcf839d4c557c3993d681665829390697353344.tar.xz
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.
-rw-r--r--windows.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/windows.c b/windows.c
index ffd0f75..df1db4f 100644
--- a/windows.c
+++ b/windows.c
@@ -2140,7 +2140,7 @@ static char *frontend_set_config(frontend *fe, int which, config_item *cfg)
/* 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 @@ static int CALLBACK ConfigDlgProc(HWND hwnd, UINT msg,
#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,