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:
@@ -10,34 +10,37 @@
|
||||
|
||||
#define NHEVENT_CHAR 1
|
||||
#define NHEVENT_MOUSE 2
|
||||
|
||||
union event_innards {
|
||||
struct {
|
||||
int ch;
|
||||
} kbd;
|
||||
|
||||
struct {
|
||||
int mod;
|
||||
int x, y;
|
||||
} ms;
|
||||
};
|
||||
|
||||
typedef struct mswin_event {
|
||||
int type;
|
||||
union {
|
||||
struct {
|
||||
int ch;
|
||||
} kbd;
|
||||
|
||||
struct {
|
||||
int mod;
|
||||
int x, y;
|
||||
} ms;
|
||||
};
|
||||
union event_innards ei;
|
||||
} MSNHEvent, *PMSNHEvent;
|
||||
|
||||
#define NHEVENT_KBD(c) \
|
||||
{ \
|
||||
MSNHEvent e; \
|
||||
e.type = NHEVENT_CHAR; \
|
||||
e.kbd.ch = (c); \
|
||||
e.ei.kbd.ch = (c); \
|
||||
mswin_input_push(&e); \
|
||||
}
|
||||
#define NHEVENT_MS(_mod, _x, _y) \
|
||||
{ \
|
||||
MSNHEvent e; \
|
||||
e.type = NHEVENT_MOUSE; \
|
||||
e.ms.mod = (_mod); \
|
||||
e.ms.x = (_x); \
|
||||
e.ms.y = (_y); \
|
||||
e.ei.ms.mod = (_mod); \
|
||||
e.ei.ms.x = (_x); \
|
||||
e.ei.ms.y = (_y); \
|
||||
mswin_input_push(&e); \
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user