From: nhmall Date: Wed, 30 Nov 2022 04:43:42 +0000 (-0500) Subject: fix a couple of ms-dos shadow declaration warnings X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6b99a508213c3700a4764f67b49d368655477cb9;p=nethack fix a couple of ms-dos shadow declaration warnings --- diff --git a/sys/msdos/vidvesa.c b/sys/msdos/vidvesa.c index 1a0354358..8c382fe5d 100644 --- a/sys/msdos/vidvesa.c +++ b/sys/msdos/vidvesa.c @@ -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); } diff --git a/sys/msdos/vidvga.c b/sys/msdos/vidvga.c index 182a448f5..c9e4ba293 100644 --- a/sys/msdos/vidvga.c +++ b/sys/msdos/vidvga.c @@ -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)); } }