Joris Huizer : winebuild: sign-compare fixes.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Mar 5 13:10:22 CST 2007


Module: wine
Branch: master
Commit: c9f145223368da9f663aaad415aa776eb2b297c2
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=c9f145223368da9f663aaad415aa776eb2b297c2

Author: Joris Huizer <joris_huizer at yahoo.com>
Date:   Sat Mar  3 05:30:03 2007 -0800

winebuild: sign-compare fixes.

---

 tools/winebuild/import.c |   12 +++++++-----
 tools/winebuild/spec32.c |    5 +++--
 tools/winebuild/utils.c  |    2 +-
 3 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c
index 2241fa5..80c6c12 100644
--- a/tools/winebuild/import.c
+++ b/tools/winebuild/import.c
@@ -168,7 +168,7 @@ static void free_imports( struct import *imp )
 /* check whether a given dll is imported in delayed mode */
 static int is_delayed_import( const char *name )
 {
-    int i;
+    unsigned int i;
 
     for (i = 0; i < delayed_imports.count; i++)
     {
@@ -468,7 +468,8 @@ static void check_undefined_exports( DLLSPEC *spec )
 static char *create_undef_symbols_file( DLLSPEC *spec )
 {
     char *as_file, *obj_file;
-    unsigned int i;
+    int i;
+    unsigned int j;
     FILE *f;
 
     as_file = get_temp_file_name( output_file_name, ".s" );
@@ -482,8 +483,8 @@ static char *create_undef_symbols_file( DLLSPEC *spec )
         if (odp->flags & FLAG_FORWARD) continue;
         fprintf( f, "\t%s %s\n", get_asm_ptr_keyword(), asm_name(odp->link_name) );
     }
-    for (i = 0; i < extra_ld_symbols.count; i++)
-        fprintf( f, "\t%s %s\n", get_asm_ptr_keyword(), asm_name(extra_ld_symbols.names[i]) );
+    for (j = 0; j < extra_ld_symbols.count; j++)
+        fprintf( f, "\t%s %s\n", get_asm_ptr_keyword(), asm_name(extra_ld_symbols.names[j]) );
     fclose( f );
 
     obj_file = get_temp_file_name( output_file_name, ".o" );
@@ -557,7 +558,8 @@ void read_undef_symbols( DLLSPEC *spec, char **argv )
 /* resolve the imports for a Win32 module */
 int resolve_imports( DLLSPEC *spec )
 {
-    unsigned int i, j, removed;
+    int i;
+    unsigned int j, removed;
     ORDDEF *odp;
 
     sort_names( &ignore_symbols );
diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c
index 6fcc42e..26e66b8 100644
--- a/tools/winebuild/spec32.c
+++ b/tools/winebuild/spec32.c
@@ -51,7 +51,7 @@ static inline int needs_relay( const ORDDEF *odp )
 /* check if dll will output relay thunks */
 int has_relays( DLLSPEC *spec )
 {
-    unsigned int i;
+    int i;
 
     if (target_cpu != CPU_x86) return 0;
 
@@ -70,7 +70,8 @@ int has_relays( DLLSPEC *spec )
  */
 static void output_relay_debug( DLLSPEC *spec )
 {
-    unsigned int i, j, args, flags;
+    int i;
+    unsigned int j, args, flags;
 
     /* first the table of entry point offsets */
 
diff --git a/tools/winebuild/utils.c b/tools/winebuild/utils.c
index 3458eb7..656e375 100644
--- a/tools/winebuild/utils.c
+++ b/tools/winebuild/utils.c
@@ -454,7 +454,7 @@ unsigned int get_alignment(unsigned int align)
     case CPU_POWERPC:
     case CPU_ALPHA:
         n = 0;
-        while ((1 << n) != align) n++;
+        while ((1u << n) != align) n++;
         return n;
     }
     /* unreached */




More information about the wine-cvs mailing list