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:
nethack.rankin
2003-10-21 05:59:33 +00:00
parent 15bd245d2b
commit 08639fdda8
2 changed files with 13 additions and 13 deletions

View File

@@ -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. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1095,7 +1095,7 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst);
case LANDMINE: {
#ifdef STEED
unsigned steed_mid = 0;
struct obj *saddle;
struct obj *saddle = 0;
#endif
if (Levitation || Flying) {
if (!already_seen && rn2(3)) break;
@@ -1106,8 +1106,8 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst);
"a trigger");
if (already_seen && rn2(3)) break;
pline("KAABLAMM!!! %s %s%s off!",
forcebungle ? "Your inept attempt sets" :
"The air currents set",
forcebungle ? "Your inept attempt sets" :
"The air currents set",
already_seen ? a_your[trap->madeby_u] : "",
already_seen ? " land mine" : "it");
} else {