]> granicus.if.org Git - nethack/commitdiff
lint cleanup
authorPatR <rankin@nethack.org>
Wed, 2 Dec 2015 10:36:29 +0000 (02:36 -0800)
committerPatR <rankin@nethack.org>
Wed, 2 Dec 2015 10:36:29 +0000 (02:36 -0800)
A couple of things 'gcc -g' didn't care about 'gcc -O2' mistakenly
thinks 'may be used uninitialized'.

src/makemon.c
win/tty/wintty.c

index 7c11e85e650dfdc586c26c98b61b8e247e304127..c2db6f5d11fd2ab18ca4dd9ebec76eacf8a276b1 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 makemon.c       $NHDT-Date: 1446955301 2015/11/08 04:01:41 $  $NHDT-Branch: master $:$NHDT-Revision: 1.101 $ */
+/* NetHack 3.6 makemon.c       $NHDT-Date: 1449052582 2015/12/02 10:36:22 $  $NHDT-Branch: master $:$NHDT-Revision: 1.104 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -1036,6 +1036,7 @@ int mmflags;
         coord cc;
         struct monst fakemon;
 
+        cc.x = cc.y = 0; /* lint suppression */
         fakemon.data = ptr; /* set up for goodpos */
         if (!makemon_rnd_goodpos(ptr ? &fakemon : (struct monst *)0,
                                  gpflags, &cc))
index de97e48b117ad7c39a4621113cd9ed8fe3f09d19..4c10ddeb994a6f7bf37987725083a997a07e05bc 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 wintty.c        $NHDT-Date: 1447630543 2015/11/15 23:35:43 $  $NHDT-Branch: master $:$NHDT-Revision: 1.115 $ */
+/* NetHack 3.6 wintty.c        $NHDT-Date: 1449052583 2015/12/02 10:36:23 $  $NHDT-Branch: master $:$NHDT-Revision: 1.116 $ */
 /* Copyright (c) David Cohrs, 1991                                */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -1652,6 +1652,7 @@ struct WinDesc *cw;
                     *rp = '\0'; /* re-terminate for index() */
                 }
     }
+    resp_len = 0; /* lint suppression */
 
     /* loop until finished */
     while (!finished) {