clear five warnings for "set but not used" variables
Note: the line numbers referenced in the warning messages below are not in sync
with the NetHack-3.7 branch and should be disregarded
files.c: In function 'get_saved_games':
files.c:1168:9: warning: unused variable 'n' [-Wunused-variable]
1168 | int n, j = 0;
| ^
mhitm.c: In function 'mdamagem':
mhitm.c:843:13: warning: variable 'cancelled' set but not used [-Wunused-but-set-variable]
843 | boolean cancelled;
| ^~~~~~~~~
mhitu.c: In function 'hitmu':
mhitu.c:943:9: warning: variable 'uncancelled' set but not used [-Wunused-but-set-variable]
943 | int uncancelled;
| ^~~~~~~~~~~
mklev.c: In function 'place_branch':
mklev.c:1214:20: warning: variable 'br_room' set but not used [-Wunused-but-set-variable]
1214 | struct mkroom *br_room;
| ^~~~~~~
monmove.c: In function 'm_move':
monmove.c:874:43: warning: variable 'doorbuster' set but not used [-Wunused-but-set-variable]
874 | boolean can_open = 0, can_unlock = 0, doorbuster = 0;
| ^~~~~~~~~~
This commit is contained in:
@@ -895,7 +895,7 @@ register int after;
|
||||
boolean likegold = 0, likegems = 0, likeobjs = 0, likemagic = 0,
|
||||
conceals = 0;
|
||||
boolean likerock = 0, can_tunnel = 0;
|
||||
boolean can_open = 0, can_unlock = 0, doorbuster = 0;
|
||||
boolean can_open = 0, can_unlock = 0 /*, doorbuster = 0 */;
|
||||
boolean uses_items = 0, setlikes = 0;
|
||||
boolean avoid = FALSE;
|
||||
boolean better_with_displacing = FALSE;
|
||||
@@ -937,7 +937,7 @@ register int after;
|
||||
can_open = !(nohands(ptr) || verysmall(ptr));
|
||||
can_unlock = ((can_open && monhaskey(mtmp, TRUE))
|
||||
|| mtmp->iswiz || is_rider(ptr));
|
||||
doorbuster = is_giant(ptr);
|
||||
/* doorbuster = is_giant(ptr); */
|
||||
if (mtmp->wormno)
|
||||
goto not_special;
|
||||
/* my dog gets special treatment */
|
||||
|
||||
Reference in New Issue
Block a user