]> granicus.if.org Git - nethack/commitdiff
fix a couple of ms-dos shadow declaration warnings
authornhmall <nhmall@nethack.org>
Wed, 30 Nov 2022 04:43:42 +0000 (23:43 -0500)
committernhmall <nhmall@nethack.org>
Wed, 30 Nov 2022 04:43:42 +0000 (23:43 -0500)
sys/msdos/vidvesa.c
sys/msdos/vidvga.c

index 1a03543588521c0ece019d0c8fcd66c7c32ee651..8c382fe5d03642536869936c7f9526169f155b15 100644 (file)
@@ -481,10 +481,10 @@ static unsigned long
 vesa_MakeColor(struct Pixel p)
 {
     unsigned long r = p.r >> vesa_red_shift;
-    unsigned long gr = p.g >> vesa_green_shift;
+    unsigned long g = p.g >> vesa_green_shift;
     unsigned long b = p.b >> vesa_blue_shift;
     return (r << vesa_red_pos)
-         | (gr << vesa_green_pos)
+         | (g << vesa_green_pos)
          | (b << vesa_blue_pos);
 }
 
index 182a448f565d355abae7171adccf629fe38d8006..c9e4ba2935567229a4eb17e93c1b9ddc10153ca0 100644 (file)
@@ -713,7 +713,7 @@ read_tile_indexes(unsigned glyph, unsigned char (*indexes)[TILE_X])
 }
 
 static void
-decal_planar(struct planar_cell_struct *gp UNUSED, unsigned special)
+decal_planar(struct planar_cell_struct *gpcs UNUSED, unsigned special)
 {
     if (special & MG_CORPSE) {
     } else if (special & MG_INVIS) {
@@ -1022,7 +1022,7 @@ vga_GetBitmap(uint32 chr, unsigned char *bitmap)
  *
  */
 static void
-vga_DisplayCell(struct planar_cell_struct *gp, int col, int row)
+vga_DisplayCell(struct planar_cell_struct *gpcs, int col, int row)
 {
     int i, pixx, pixy;
     char __far *tmp_s; /* source pointer */
@@ -1037,10 +1037,10 @@ vga_DisplayCell(struct planar_cell_struct *gp, int col, int row)
             tmp_d = screentable[i + pixy];
             tmp_d += pixx;
             /*
-             * memcpy((void *)tmp,(void *)gp->plane[vplane].image[i],
+             * memcpy((void *)tmp,(void *)gpcs->plane[vplane].image[i],
              *         BYTES_PER_CELL);
              */
-            tmp_s = gp->plane[vplane].image[i];
+            tmp_s = gpcs->plane[vplane].image[i];
             WRITE_ABSOLUTE(tmp_d, (*tmp_s));
             ++tmp_s;
             ++tmp_d;
@@ -1051,7 +1051,7 @@ vga_DisplayCell(struct planar_cell_struct *gp, int col, int row)
 }
 
 static void
-vga_DisplayCell_O(struct overview_planar_cell_struct *gp, int col, int row)
+vga_DisplayCell_O(struct overview_planar_cell_struct *gpcs, int col, int row)
 {
     int i, pixx, pixy;
     char __far *tmp_s; /* source pointer */
@@ -1066,10 +1066,10 @@ vga_DisplayCell_O(struct overview_planar_cell_struct *gp, int col, int row)
             tmp_d = screentable[i + pixy];
             tmp_d += pixx;
             /*
-             * memcpy((void *)tmp,(void *)gp->plane[vplane].image[i],
+             * memcpy((void *)tmp,(void *)gpcs->plane[vplane].image[i],
              *         BYTES_PER_CELL);
              */
-            tmp_s = gp->plane[vplane].image[i];
+            tmp_s = gpcs->plane[vplane].image[i];
             WRITE_ABSOLUTE(tmp_d, (*tmp_s));
         }
     }