deal with some win/win32 warnings
win/win32/mhdlg.c(137) : warning C4456: declaration of 'wbuf' hides
previous local declaration
win/win32/mhdlg.c(62) : note: see declaration of 'wbuf'
win/win32/mhdlg.c(875) : warning C4189: 'gender': local variable is
initialized but not referenced
win/win32/mhdlg.c(874) : warning C4189: 'race': local variable is
initialized but not referenced
win/win32/mhdlg.c(876) : warning C4189: 'alignment': local variable is
initialized but not referenced
win/win32/mhdlg.c(873) : warning C4189: 'role': local variable is
initialized but not referenced
win/win32/mhinput.h(24) : warning C4201: nonstandard extension used:
nameless struct/union
win/win32/mhmsg.h(70) : warning C4200: nonstandard extension used:
zero-sized array in struct/union
win/win32/mhinput.h(24) : warning C4201: nonstandard extension used:
nameless struct/union
win/win32/mhinput.h(24) : warning C4201: nonstandard extension used:
nameless struct/union
win/win32/mhmsg.h(70) : warning C4200: nonstandard extension used:
zero-sized array in struct/union
win/win32/mhmsg.h(70) : warning C4200: nonstandard extension used:
zero-sized array in struct/union
win/win32/mhmenu.c(62) : warning C4201: nonstandard extension used:
nameless struct/union
win/win32/mhmenu.c(1082) : warning C4456: declaration of 'monitorScale'
hides previous local declaration
win/win32/mhmenu.c(995) : note: see declaration of 'monitorScale'
win/win32/mhmenu.c(1142) : warning C4456: declaration of 'wbuf' hides
previous local declaration
win/win32/mhmenu.c(986) : note: see declaration of 'wbuf'
win/win32/mhmenu.c(1082) : warning C4189: 'monitorScale': local variable
is initialized but not referenced
win/win32/mhmsg.h(70) : warning C4200: nonstandard extension used:
zero-sized array in struct/union
win/win32/mhmsgwnd.c(700): warning C4701: potentially uninitialized
local variable 'size' used
win/win32/mhmsg.h(70) : warning C4200: nonstandard extension used:
zero-sized array in struct/union
win/win32/mhmsg.h(70) : warning C4200: nonstandard extension used:
zero-sized array in struct/union
win/win32/mhsplash.c(158): warning C4189: 'verstrsize': local variable
is initialized but not referenced
win/win32/mhmsg.h(70) : warning C4200: nonstandard extension used:
zero-sized array in struct/union
win/win32/mhstatus.c(353): warning C4057: 'function':
'const unsigned char *' differs in indirection
to slightly different base types from 'const char *'
win/win32/mhmsg.h(70) : warning C4200: nonstandard extension used:
zero-sized array in struct/union
win/win32/mhmsg.h(70) : warning C4200: nonstandard extension used:
zero-sized array in struct/union
win/win32/NetHackW.c(181): warning C4456: declaration of 'buf' hides
previous local declaration
win/win32/NetHackW.c(90) : note: see declaration of 'buf'
win/win32/NetHackW.c(189): warning C4456: declaration of 'buf' hides
previous local declaration
win/win32/NetHackW.c(90) : note: see declaration of 'buf'
This commit is contained in:
+17
-11
@@ -134,7 +134,7 @@ GetlinDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
break;
|
||||
|
||||
case WM_COMMAND: {
|
||||
TCHAR wbuf[BUFSZ];
|
||||
TCHAR wbuf2[BUFSZ];
|
||||
|
||||
switch (LOWORD(wParam)) {
|
||||
/* OK button was pressed */
|
||||
@@ -142,8 +142,8 @@ GetlinDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
data =
|
||||
(struct getlin_data *) GetWindowLongPtr(hWnd, GWLP_USERDATA);
|
||||
SendDlgItemMessage(hWnd, IDC_GETLIN_EDIT, WM_GETTEXT,
|
||||
(WPARAM) sizeof(wbuf), (LPARAM) wbuf);
|
||||
NH_W2A(wbuf, data->result, data->result_size);
|
||||
(WPARAM) sizeof(wbuf2), (LPARAM) wbuf2);
|
||||
NH_W2A(wbuf2, data->result, data->result_size);
|
||||
|
||||
/* Fall through. */
|
||||
|
||||
@@ -870,11 +870,16 @@ plselAdjustSelections(HWND hWnd)
|
||||
int
|
||||
plselFinalSelection(HWND hWnd)
|
||||
{
|
||||
int role = flags.initrole;
|
||||
int race = flags.initrace;
|
||||
int gender = flags.initgend;
|
||||
int alignment = flags.initalign;
|
||||
int role, race, gender, alignment;
|
||||
|
||||
nhUse(role);
|
||||
nhUse(race);
|
||||
nhUse(gender);
|
||||
nhUse(alignment);
|
||||
role = flags.initrole;
|
||||
race = flags.initrace;
|
||||
gender = flags.initgend;
|
||||
alignment = flags.initalign;
|
||||
assert(role != ROLE_RANDOM && role != ROLE_NONE);
|
||||
assert(race != ROLE_RANDOM && race != ROLE_NONE);
|
||||
assert(gender != ROLE_RANDOM && gender != ROLE_NONE);
|
||||
@@ -889,6 +894,7 @@ plselFinalSelection(HWND hWnd)
|
||||
|
||||
static boolean plselRandomize(plsel_data_t * data)
|
||||
{
|
||||
int role, race, gender, alignment;
|
||||
boolean fully_specified = TRUE;
|
||||
|
||||
// restore back to configuration settings
|
||||
@@ -914,10 +920,10 @@ static boolean plselRandomize(plsel_data_t * data)
|
||||
|
||||
rigid_role_checks();
|
||||
|
||||
int role = flags.initrole;
|
||||
int race = flags.initrace;
|
||||
int gender = flags.initgend;
|
||||
int alignment = flags.initalign;
|
||||
role = flags.initrole;
|
||||
race = flags.initrace;
|
||||
gender = flags.initgend;
|
||||
alignment = flags.initalign;
|
||||
|
||||
assert(role != ROLE_RANDOM && role != ROLE_NONE);
|
||||
assert(race != ROLE_RANDOM && race != ROLE_NONE);
|
||||
|
||||
Reference in New Issue
Block a user