Skip to contentSkip to conversation

shut up gcc 3.3 for scripts/pnmtologo.c

PATCH New Rolf Eike Beer 1 participant 1 message Sep 24, 2003

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 shut up gcc 3.3 for scripts/pnmtologo.c

Hi,

this patch makes some ints to unsigned ints. They are only used as loop counters and compared to unsigned ints. GCC 3.3 doesn't like this. They will never be negative anyway, so we could easily shut him up.

Eike

scripts/pnmtologo.c +6 -5
@@ -119,7 +119,8 @@
 static void read_image(void)
 {
     FILE *fp;
-    int i, j, magic;
+    unsigned int i, j;
+    int magic;
     unsigned int maxval;
 
     /* open image file */
@@ -274,7 +275,7 @@
 
 static void write_logo_mono(void)
 {
-    int i, j;
+    unsigned int i, j;
     unsigned char val, bit;
 
     /* validate image */
@@ -302,7 +303,7 @@
 
 static void write_logo_vga16(void)
 {
-    int i, j, k;
+    unsigned int i, j, k;
     unsigned char val;
 
     /* validate image */
@@ -342,7 +343,7 @@
 
 static void write_logo_clut224(void)
 {
-    int i, j, k;
+    unsigned int i, j, k;
 
     /* validate image */
     for (i = 0; i < logo_height; i++)
@@ -388,7 +389,7 @@
 
 static void write_logo_gray256(void)
 {
-    int i, j;
+    unsigned int i, j;
 
     /* validate image */
     for (i = 0; i < logo_height; i++)