]> granicus.if.org Git - nethack/commitdiff
quiet warning
authornethack.allison <nethack.allison>
Sun, 1 Jun 2003 14:19:16 +0000 (14:19 +0000)
committernethack.allison <nethack.allison>
Sun, 1 Jun 2003 14:19:16 +0000 (14:19 +0000)
A recent patch triggered a warning about signed/unsigned mismatch in
an assignment.

src/mkmap.c

index a885ee3f047862a893ac00a1cee93504edb5c25f..931775cde772fcb8244b0fa14459574529aa756a 100644 (file)
@@ -17,7 +17,7 @@ STATIC_DCL void FDECL(pass_three,(SCHAR_P,SCHAR_P));
 STATIC_DCL void NDECL(wallify_map);
 STATIC_DCL void FDECL(join_map,(SCHAR_P,SCHAR_P));
 STATIC_DCL void FDECL(finish_map,(SCHAR_P,SCHAR_P,XCHAR_P,XCHAR_P));
-STATIC_DCL void FDECL(remove_room,(int));
+STATIC_DCL void FDECL(remove_room,(unsigned));
 void FDECL(mkmap, (lev_init *));
 
 char *new_locations;
@@ -402,7 +402,7 @@ remove_rooms(lx, ly, hx, hy)
            if (croom->ly >= ly && croom->hy >= hy) croom->ly = hy;
        } else {
            /* total overlap, remove the room */
-           remove_room(i);
+           remove_room((unsigned)i);
        }
     }
 }
@@ -415,11 +415,12 @@ remove_rooms(lx, ly, hx, hy)
  */
 STATIC_OVL void
 remove_room(roomno)
-    int roomno;
+    unsigned roomno;
 {
     struct mkroom *croom = &rooms[roomno];
     struct mkroom *maxroom = &rooms[--nroom];
-    int i, j, oroomno;
+    int i, j;
+    unsigned oroomno;
 
     if (croom != maxroom) {
        /* since the order in the array only matters for making corridors,