some lint cleanup
Using gcc -Wall -Wshadow -Wpointer-arith -Wwrite-strings \ -Wmissing-braces -Wmissing-prototypes with an old version of gcc. mhitu.c: In function `hitmu': mhitu.c:1176: warning: declaration of `buf' shadows previous local options.c: In function `special_handling': options.c:2712: warning: initialization discards `const' from pointer target type options.c:2745: warning: initialization discards `const' from pointer target typ trap.c: In function `dotrap': trap.c:1111: warning: `saddle' might be used uninitialized in this function The first one is no longer present in the trunk code. The last one is bogus as its wishy-washy wording suggests.
This commit is contained in:
+7
-7
@@ -1,4 +1,4 @@
|
|||||||
/* SCCS Id: @(#)options.c 3.4 2003/05/19 */
|
/* SCCS Id: @(#)options.c 3.4 2003/10/20 */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -2704,12 +2704,12 @@ boolean setinitial,setfromfile;
|
|||||||
}
|
}
|
||||||
destroy_nhwindow(tmpwin);
|
destroy_nhwindow(tmpwin);
|
||||||
retval = TRUE;
|
retval = TRUE;
|
||||||
}
|
} else if (!strcmp("number_pad", optname)) {
|
||||||
else if (!strcmp("number_pad", optname)) {
|
|
||||||
static const char *npchoices[3] =
|
static const char *npchoices[3] =
|
||||||
{"0 (off)", "1 (on)", "2 (on, DOS compatible)"};
|
{"0 (off)", "1 (on)", "2 (on, DOS compatible)"};
|
||||||
char *npletters = "abc";
|
const char *npletters = "abc";
|
||||||
menu_item *mode_pick = (menu_item *)0;
|
menu_item *mode_pick = (menu_item *)0;
|
||||||
|
|
||||||
tmpwin = create_nhwindow(NHW_MENU);
|
tmpwin = create_nhwindow(NHW_MENU);
|
||||||
start_menu(tmpwin);
|
start_menu(tmpwin);
|
||||||
for (i = 0; i < SIZE(npchoices); i++) {
|
for (i = 0; i < SIZE(npchoices); i++) {
|
||||||
@@ -2738,11 +2738,11 @@ boolean setinitial,setfromfile;
|
|||||||
}
|
}
|
||||||
destroy_nhwindow(tmpwin);
|
destroy_nhwindow(tmpwin);
|
||||||
retval = TRUE;
|
retval = TRUE;
|
||||||
}
|
} else if (!strcmp("menu_headings", optname)) {
|
||||||
else if (!strcmp("menu_headings", optname)) {
|
|
||||||
static const char *mhchoices[3] = {"bold", "inverse", "underline"};
|
static const char *mhchoices[3] = {"bold", "inverse", "underline"};
|
||||||
char *npletters = "biu";
|
const char *npletters = "biu";
|
||||||
menu_item *mode_pick = (menu_item *)0;
|
menu_item *mode_pick = (menu_item *)0;
|
||||||
|
|
||||||
tmpwin = create_nhwindow(NHW_MENU);
|
tmpwin = create_nhwindow(NHW_MENU);
|
||||||
start_menu(tmpwin);
|
start_menu(tmpwin);
|
||||||
for (i = 0; i < SIZE(mhchoices); i++) {
|
for (i = 0; i < SIZE(mhchoices); i++) {
|
||||||
|
|||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
/* SCCS Id: @(#)trap.c 3.4 2003/09/25 */
|
/* SCCS Id: @(#)trap.c 3.4 2003/10/20 */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -1095,7 +1095,7 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst);
|
|||||||
case LANDMINE: {
|
case LANDMINE: {
|
||||||
#ifdef STEED
|
#ifdef STEED
|
||||||
unsigned steed_mid = 0;
|
unsigned steed_mid = 0;
|
||||||
struct obj *saddle;
|
struct obj *saddle = 0;
|
||||||
#endif
|
#endif
|
||||||
if (Levitation || Flying) {
|
if (Levitation || Flying) {
|
||||||
if (!already_seen && rn2(3)) break;
|
if (!already_seen && rn2(3)) break;
|
||||||
|
|||||||
Reference in New Issue
Block a user