Fix compiler warning in GC_dyld_image_add/remove (Darwin)
authorIvan Maidanski <ivmai@mail.ru>
Wed, 28 Dec 2011 06:42:49 +0000 (10:42 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 28 Dec 2011 06:44:35 +0000 (10:44 +0400)
* dyn_load.c (GC_dyld_image_add, GC_dyld_image_remove): Declare i, j
local variables as unsigned (to prevent compiler warning in
a comparison involving sizeof)

dyn_load.c

index e823c8d..8532d28 100644 (file)
@@ -1230,7 +1230,7 @@ STATIC void GC_dyld_image_add(const struct GC_MACH_HEADER *hdr,
                               intptr_t slide)
 {
   unsigned long start, end;
-  int i, j;
+  unsigned i, j;
   const struct GC_MACH_SECTION *sec;
   const char *name;
   GC_has_static_roots_func callback = GC_has_static_roots;
@@ -1295,7 +1295,7 @@ STATIC void GC_dyld_image_remove(const struct GC_MACH_HEADER *hdr,
                                  intptr_t slide)
 {
   unsigned long start, end;
-  int i, j;
+  unsigned i, j;
   const struct GC_MACH_SECTION *sec;
   char secnam[16];
   const char *fmt;