mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 16:05:44 -07:00
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.
This commit is contained in:
@ -2140,7 +2140,7 @@ static char *frontend_set_config(frontend *fe, int which, config_item *cfg)
|
|||||||
/* Control coordinates should be specified in dialog units. */
|
/* Control coordinates should be specified in dialog units. */
|
||||||
HWND mkctrl(frontend *fe, int x1, int x2, int y1, int y2,
|
HWND mkctrl(frontend *fe, int x1, int x2, int y1, int y2,
|
||||||
LPCTSTR wclass, int wstyle,
|
LPCTSTR wclass, int wstyle,
|
||||||
int exstyle, const char *wtext, int wid)
|
int exstyle, const char *wtext, INT_PTR wid)
|
||||||
{
|
{
|
||||||
RECT rc;
|
RECT rc;
|
||||||
TCHAR wwtext[256];
|
TCHAR wwtext[256];
|
||||||
@ -2349,7 +2349,7 @@ static int CALLBACK ConfigDlgProc(HWND hwnd, UINT msg,
|
|||||||
#ifndef _WIN32_WCE
|
#ifndef _WIN32_WCE
|
||||||
HWND mkctrl(frontend *fe, int x1, int x2, int y1, int y2,
|
HWND mkctrl(frontend *fe, int x1, int x2, int y1, int y2,
|
||||||
char *wclass, int wstyle,
|
char *wclass, int wstyle,
|
||||||
int exstyle, const char *wtext, int wid)
|
int exstyle, const char *wtext, INT_PTR wid)
|
||||||
{
|
{
|
||||||
HWND ret;
|
HWND ret;
|
||||||
ret = CreateWindowEx(exstyle, wclass, wtext,
|
ret = CreateWindowEx(exstyle, wclass, wtext,
|
||||||
|
Reference in New Issue
Block a user