tiles lint

Several instances of "comparison between signed and unsigned".

  win/share/tiletext.c
  win/X11/tile2x11.c
This commit is contained in:
PatR
2015-05-03 01:03:24 -07:00
parent 23a671147f
commit fc567b5ce3
2 changed files with 9 additions and 9 deletions

View File

@@ -1,10 +1,10 @@
/* $NHDT-Date: 1430640199 2015/05/03 08:03:19 $ $NHDT-Branch: master $:$NHDT-Revision: 1.3 $ */
/* $Date: 2002/03/17 20:02:47 $ $Revision: 1.2 $ */
/* /*
* Convert the given input files into an output file that is expected * Convert the given input files into an output file that is expected
* by nethack. * by nethack.
* *
* $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$
* $Date: 2002/03/17 20:02:47 $ $Revision: 1.2 $
*
* Assumptions: * Assumptions:
* + Two dimensional byte arrays are in row order and are not padded * + Two dimensional byte arrays are in row order and are not padded
* between rows (x11_colormap[][]). * between rows (x11_colormap[][]).
@@ -28,7 +28,7 @@ static unsigned char
pix_to_colormap(pix) pix_to_colormap(pix)
pixel pix; pixel pix;
{ {
int i; unsigned i;
for (i = 0; i < header.ncolors; i++) { for (i = 0; i < header.ncolors; i++) {
if (pix.r == ColorMap[CM_RED][i] && if (pix.r == ColorMap[CM_RED][i] &&
@@ -80,9 +80,9 @@ convert_tiles(tb_ptr, total)
static void static void
merge_text_colormap() merge_text_colormap()
{ {
int i, j; unsigned i, j;
for (i = 0; i < colorsinmap; i++) { for (i = 0; i < (unsigned)colorsinmap; i++) {
for (j = 0; j < header.ncolors; j++) for (j = 0; j < header.ncolors; j++)
if (x11_colormap[j][CM_RED] == ColorMap[CM_RED][i] && if (x11_colormap[j][CM_RED] == ColorMap[CM_RED][i] &&
x11_colormap[j][CM_GREEN] == ColorMap[CM_GREEN][i] && x11_colormap[j][CM_GREEN] == ColorMap[CM_GREEN][i] &&

View File

@@ -1,4 +1,4 @@
/* NetHack 3.5 tiletext.c $NHDT-Date: 1429484196 2015/04/19 22:56:36 $ $NHDT-Branch: master $:$NHDT-Revision: 1.6 $ */ /* NetHack 3.5 tiletext.c $NHDT-Date: 1430640200 2015/05/03 08:03:20 $ $NHDT-Branch: master $:$NHDT-Revision: 1.7 $ */
/* NetHack 3.5 tiletext.c $Date: 2009/05/06 10:59:03 $ $Revision: 1.4 $ */ /* NetHack 3.5 tiletext.c $Date: 2009/05/06 10:59:03 $ $Revision: 1.4 $ */
/* SCCS Id: @(#)tiletext.c 3.5 1999/10/24 */ /* SCCS Id: @(#)tiletext.c 3.5 1999/10/24 */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -286,8 +286,8 @@ const char *type;
/* Fill placeholder with noise */ /* Fill placeholder with noise */
if ( !placeholder_init ) { if ( !placeholder_init ) {
placeholder_init++; placeholder_init++;
for ( i=0; i<sizeof(placeholder); i++ ) for (i = 0; i < (int)sizeof placeholder; i++)
((char*)placeholder)[i]=i%256; ((char *)placeholder)[i] = i % 256;
} }
read_text_colormap(tile_file); read_text_colormap(tile_file);