Lowering the scope And cleaning up some warnings from static analysis
[open-adventure.git] / main.c
diff --git a/main.c b/main.c
index 6ba8897825bd286f32d392202c17d876f99348d3..ecc9ca03a2f1a13ccc522d464249e67d58692a77 100644 (file)
--- a/main.c
+++ b/main.c
@@ -860,10 +860,9 @@ static void listobjects(void)
  *  get full score. */
 {
     if (!DARK(game.loc)) {
-       long obj;
        ++game.abbrev[game.loc];
        for (int i=game.atloc[game.loc]; i != 0; i=game.link[i]) {
-           obj=i;
+           long obj=i;
            if (obj > NOBJECTS)obj=obj-NOBJECTS;
            if (obj == STEPS && TOTING(NUGGET))
                continue;