]> granicus.if.org Git - nethack/commitdiff
fix some compiler warnings windows cmdline
authornhmall <mjnh@persona.ca>
Mon, 30 Mar 2015 00:07:41 +0000 (20:07 -0400)
committernhmall <mjnh@persona.ca>
Mon, 30 Mar 2015 00:07:41 +0000 (20:07 -0400)
 Changes to be committed:
modified:   src/hack.c
modified:   src/vision.c

src/hack.c
src/vision.c

index 32ceb8e69e413c56a6c8c470db7c6fb798624396..5e14a3fabaf52599a7153d26068b21232b3fe2e6 100644 (file)
@@ -1104,7 +1104,7 @@ domove()
        register struct monst *mtmp;
        register struct rm *tmpr;
        register xchar x,y;
-       struct trap *trap;
+       struct trap *trap = (struct trap *)0;
        int wtcap;
        boolean on_ice;
        xchar chainx, chainy, ballx, bally;     /* ball&chain new positions */
index a6585de144c90b3a622024617581b70683ffce46..8abf63c798487945b985bc8f7602e6c38000c74b 100644 (file)
@@ -2198,9 +2198,9 @@ right_side(row, left, right_mark, limits)
     int                  deeper;       /* if TRUE, call self as needed */
     int                  result;       /* set by q?_path() */
     register int  i;           /* loop counter */
-    register char *rowp;       /* row optimization */
-    char         *row_min;     /* left most  [used by macro set_min()] */
-    char         *row_max;     /* right most [used by macro set_max()] */
+    register char *rowp = NULL;        /* row optimization */
+    char         *row_min = NULL;      /* left most  [used by macro set_min()] */
+    char         *row_max = NULL;      /* right most [used by macro set_max()] */
     int                  lim_max;      /* right most limit of circle */
 
 #ifdef GCC_WARN
@@ -2374,8 +2374,8 @@ left_side(row, left_mark, right, limits)
 {
     int                  left, left_edge, nrow, deeper, result;
     register int  i;
-    register char *rowp;
-    char         *row_min, *row_max;
+    register char *rowp = NULL;
+    char         *row_min = NULL, *row_max = NULL;
     int                  lim_min;
 
 #ifdef GCC_WARN