Joris Huizer : libwine: sign-compare fixes.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Jan 26 07:47:01 CST 2007


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

Author: Joris Huizer <joris_huizer at yahoo.com>
Date:   Thu Jan 25 13:14:01 2007 -0800

libwine: sign-compare fixes.

---

 libs/wine/loader.c |   15 ++++++++-------
 libs/wine/mmap.c   |    2 +-
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/libs/wine/loader.c b/libs/wine/loader.c
index abf428d..10be9e7 100644
--- a/libs/wine/loader.c
+++ b/libs/wine/loader.c
@@ -59,10 +59,10 @@ char **__wine_main_environ = NULL;
 
 struct dll_path_context
 {
-    int   index;    /* current index in the dll path list */
-    char *buffer;   /* buffer used for storing path names */
-    char *name;     /* start of file name part in buffer (including leading slash) */
-    int   namelen;  /* length of file name without .so extension */
+    unsigned int index; /* current index in the dll path list */
+    char *buffer;       /* buffer used for storing path names */
+    char *name;         /* start of file name part in buffer (including leading slash) */
+    int   namelen;      /* length of file name without .so extension */
 };
 
 #define MAX_DLLS 100
@@ -82,7 +82,7 @@ static load_dll_callback_t load_dll_call
 static const char *build_dir;
 static const char *default_dlldir;
 static const char **dll_paths;
-static int nb_dll_paths;
+static unsigned int nb_dll_paths;
 static int dll_path_maxlen;
 
 extern void mmap_init(void);
@@ -162,7 +162,7 @@ inline static char *prepend( char *buffe
 /* get a filename from the next entry in the dll path */
 static char *next_dll_path( struct dll_path_context *context )
 {
-    int index = context->index++;
+    unsigned int index = context->index++;
     int namelen = context->namelen;
     char *path = context->name;
 
@@ -331,7 +331,8 @@ static void *map_dll( const IMAGE_NT_HEA
     DWORD code_start, data_start, data_end;
     const size_t page_size = getpagesize();
     const size_t page_mask = page_size - 1;
-    int i, delta, nb_sections = 2;  /* code + data */
+    int delta, nb_sections = 2;  /* code + data */
+    unsigned int i;
 
     size_t size = (sizeof(IMAGE_DOS_HEADER)
                    + sizeof(IMAGE_NT_HEADERS)
diff --git a/libs/wine/mmap.c b/libs/wine/mmap.c
index b6f5595..d7fd31b 100644
--- a/libs/wine/mmap.c
+++ b/libs/wine/mmap.c
@@ -49,7 +49,7 @@ struct reserved_area
 };
 
 static struct list reserved_areas = LIST_INIT(reserved_areas);
-static const int granularity_mask = 0xffff;  /* reserved areas have 64k granularity */
+static const unsigned int granularity_mask = 0xffff;  /* reserved areas have 64k granularity */
 
 #ifdef HAVE_MMAP
 




More information about the wine-cvs mailing list