]> granicus.if.org Git - nethack/commitdiff
warning fix
authorPatR <rankin@nethack.org>
Thu, 19 Mar 2020 22:08:43 +0000 (15:08 -0700)
committerPatR <rankin@nethack.org>
Thu, 19 Mar 2020 22:08:43 +0000 (15:08 -0700)
This one is more interesting that most....

|sp_lev.c:3745:9: warning: declaration shadows a variable in the
|      global scope [-Wshadow]
|boolean ladder;
|        ^
|../include/rm.h:538:20: note: expanded from macro 'ladder'
|#define ladder     flags /* up or down */
|                   ^
|../include/flag.h:428:29: note: previous declaration is here
|extern NEARDATA struct flag flags;
|                            ^

src/sp_lev.c

index f371a9d514bf66f141a15d6e5cb97914a2d8341d..d74f641ed92b8cc62cefcbd973c7985f762bb0f1 100755 (executable)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 sp_lev.c        $NHDT-Date: 1582592810 2020/02/25 01:06:50 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.162 $ */
+/* NetHack 3.6 sp_lev.c        $NHDT-Date: 1584655714 2020/03/19 22:08:34 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.181 $ */
 /*      Copyright (c) 1989 by Jean-Christophe Collet */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -3740,9 +3740,9 @@ struct sp_coder *coder UNUSED;
 }
 
 static int
-l_create_stairway(L, ladder)
+l_create_stairway(L, using_ladder)
 lua_State *L;
-boolean ladder;
+boolean using_ladder;
 {
     static const char *const stairdirs[] = { "down", "up", NULL };
     static const int stairdirs2i[] = { 0, 1 };
@@ -3782,7 +3782,7 @@ boolean ladder;
         deltrap(badtrap);
     SpLev_Map[x][y] = 1;
 
-    if (ladder) {
+    if (using_ladder) {
         levl[x][y].typ = LADDER;
         if (up) {
             xupladder = x;