gcc 4.0 -Wpointer-sign fixes.

diff --git a/dlls/avifil32/acmstream.c b/dlls/avifil32/acmstream.c
index e4fba30..43fbc0e 100644
--- a/dlls/avifil32/acmstream.c
+++ b/dlls/avifil32/acmstream.c
@@ -74,7 +74,7 @@
 typedef struct _IAVIStreamImpl {
   /* IUnknown stuff */
   const IAVIStreamVtbl *lpVtbl;
-  DWORD		  ref;
+  LONG		  ref;
 
   /* IAVIStream stuff */
   PAVISTREAM      pStream;
diff --git a/dlls/avifil32/avifile.c b/dlls/avifil32/avifile.c
index ff860d7..66b9bc5 100644
--- a/dlls/avifil32/avifile.c
+++ b/dlls/avifil32/avifile.c
@@ -149,7 +149,7 @@
 typedef struct _IAVIStreamImpl {
   /* IUnknown stuff */
   const IAVIStreamVtbl *lpVtbl;
-  DWORD		    ref;
+  LONG		    ref;
 
   /* IAVIStream stuff */
   IAVIFileImpl     *paf;
@@ -178,7 +178,7 @@
 struct _IAVIFileImpl {
   /* IUnknown stuff */
   const IAVIFileVtbl     *lpVtbl;
-  DWORD		    ref;
+  LONG		    ref;
 
   /* IAVIFile stuff... */
   IPersistFileImpl  iPersistFile;
diff --git a/dlls/avifil32/editstream.c b/dlls/avifil32/editstream.c
index 3f7d9bd..091cda8 100644
--- a/dlls/avifil32/editstream.c
+++ b/dlls/avifil32/editstream.c
@@ -165,7 +165,7 @@
 struct _IAVIEditStreamImpl {
   /* IUnknown stuff */
   const IAVIEditStreamVtbl *lpVtbl;
-  DWORD  ref;
+  LONG  ref;
 
   /* IAVIEditStream stuff */
   IEditAVIStreamImpl      iAVIStream;
diff --git a/dlls/avifil32/getframe.c b/dlls/avifil32/getframe.c
index 3ff4910..654cb91 100644
--- a/dlls/avifil32/getframe.c
+++ b/dlls/avifil32/getframe.c
@@ -67,7 +67,7 @@
 typedef struct _IGetFrameImpl {
   /* IUnknown stuff */
   const IGetFrameVtbl *lpVtbl;
-  DWORD              ref;
+  LONG               ref;
 
   /* IGetFrame stuff */
   BOOL               bFixedStream;
diff --git a/dlls/avifil32/icmstream.c b/dlls/avifil32/icmstream.c
index 6d375ce..fd1234b 100644
--- a/dlls/avifil32/icmstream.c
+++ b/dlls/avifil32/icmstream.c
@@ -77,7 +77,7 @@
 typedef struct _IAVIStreamImpl {
   /* IUnknown stuff */
   const IAVIStreamVtbl *lpVtbl;
-  DWORD		     ref;
+  LONG		     ref;
 
   /* IAVIStream stuff */
   PAVISTREAM         pStream;
diff --git a/dlls/avifil32/tmpfile.c b/dlls/avifil32/tmpfile.c
index b0b6c43..5968103 100644
--- a/dlls/avifil32/tmpfile.c
+++ b/dlls/avifil32/tmpfile.c
@@ -66,7 +66,7 @@
 typedef struct _ITmpFileImpl {
   /* IUnknown stuff */
   const IAVIFileVtbl *lpVtbl;
-  DWORD         ref;
+  LONG         ref;
 
   /* IAVIFile stuff */
   AVIFILEINFOW  fInfo;
diff --git a/dlls/avifil32/wavfile.c b/dlls/avifil32/wavfile.c
index d14563f..c3c2e23 100644
--- a/dlls/avifil32/wavfile.c
+++ b/dlls/avifil32/wavfile.c
@@ -187,7 +187,7 @@
 struct _IAVIFileImpl {
   /* IUnknown stuff */
   const IAVIFileVtbl *lpVtbl;
-  DWORD		    ref;
+  LONG		    ref;
 
   /* IAVIFile, IAVIStream stuff... */
   IPersistFileImpl  iPersistFile;
diff --git a/tools/sfnt2fnt.c b/tools/sfnt2fnt.c
index eee3de4..ecf3ae9 100644
--- a/tools/sfnt2fnt.c
+++ b/tools/sfnt2fnt.c
@@ -123,7 +123,7 @@
     DWORD start;
     CHAR_TABLE_ENTRY *dfCharTable;
     int i, x, y, x_off, x_end, first_char;
-    FT_Int gi;
+    FT_UInt gi;
     int num_names;
     const union cptable *cptable;
     FT_SfntName sfntname;
diff --git a/tools/winebuild/spec16.c b/tools/winebuild/spec16.c
index 413d78f..04378e6 100644
--- a/tools/winebuild/spec16.c
+++ b/tools/winebuild/spec16.c
@@ -398,7 +398,7 @@
     ORDDEF **type, **typelist;
     int i, nFuncs, nTypes;
     unsigned char *resdir_buffer, *resdata_buffer, *et_buffer, *data_buffer;
-    unsigned char string[256];
+    char string[256];
     unsigned int ne_offset, segtable_offset, impnames_offset;
     unsigned int entrypoint_size, callfrom_size;
     unsigned int code_size, code_offset;
diff --git a/tools/winedump/le.c b/tools/winedump/le.c
index 5301dc9..9432a16 100644
--- a/tools/winedump/le.c
+++ b/tools/winedump/le.c
@@ -288,7 +288,7 @@
 
 static void dump_le_names( const void *base, const IMAGE_VXD_HEADER *le )
 {
-    const char *pstr = (const char *)le + le->e32_restab;
+    const unsigned char *pstr = (const unsigned char *)le + le->e32_restab;
 
     printf( "\nResident name table:\n" );
     while (*pstr)
@@ -300,7 +300,7 @@
     if (le->e32_cbnrestab)
     {
         printf( "\nNon-resident name table:\n" );
-        pstr = (char *)base + le->e32_nrestab;
+        pstr = (unsigned char *)base + le->e32_nrestab;
         while (*pstr)
         {
             printf( " %4d: %*.*s\n", get_word(pstr + *pstr + 1), *pstr, *pstr,
diff --git a/tools/winedump/lnk.c b/tools/winedump/lnk.c
index 6560f76..056354f 100644
--- a/tools/winedump/lnk.c
+++ b/tools/winedump/lnk.c
@@ -312,9 +312,10 @@
 0x47,0x48,0x49,0x4a,0x4b,0x4c,0x4d,0x4e,0x4f,0x50,0x51,0x52,0xff,0x53,0x54,0xff,
 };
 
-static int base85_to_guid( const unsigned char *str, LPGUID guid )
+static int base85_to_guid( const char *str, LPGUID guid )
 {
     DWORD i, val = 0, base = 1, *p;
+    unsigned char ch;
 
     p = (DWORD*) guid;
     for( i=0; i<20; i++ )
@@ -324,10 +325,11 @@
             val = 0;
             base = 1;
         }
-        val += table_dec85[str[i]] * base;
-        if( str[i] >= 0x80 )
+        ch = str[i];
+        if( ch >= 0x80 )
             return 0;
-        if( table_dec85[str[i]] == 0xff )
+        val += table_dec85[ch] * base;
+        if( table_dec85[ch] == 0xff )
             return 0;
         if( (i%5) == 4 )
             p[i/5] = val;
diff --git a/tools/winedump/ne.c b/tools/winedump/ne.c
index 02af56b..47b3dae 100644
--- a/tools/winedump/ne.c
+++ b/tools/winedump/ne.c
@@ -97,7 +97,7 @@
 
 static void dump_ne_names( const void *base, const IMAGE_OS2_HEADER *ne )
 {
-    const char *pstr = (const char *)ne + ne->ne_restab;
+    const unsigned char *pstr = (const unsigned char *)ne + ne->ne_restab;
 
     printf( "\nResident name table:\n" );
     while (*pstr)
@@ -108,7 +108,7 @@
     if (ne->ne_cbnrestab)
     {
         printf( "\nNon-resident name table:\n" );
-        pstr = (char *)base + ne->ne_nrestab;
+        pstr = (unsigned char *)base + ne->ne_nrestab;
         while (*pstr)
         {
             printf( " %4d: %*.*s\n", get_word(pstr + *pstr + 1), *pstr, *pstr, pstr + 1 );
diff --git a/tools/winedump/winedump.h b/tools/winedump/winedump.h
index 4439cc6..2fefbda 100644
--- a/tools/winedump/winedump.h
+++ b/tools/winedump/winedump.h
@@ -82,7 +82,7 @@
   char *return_text;
   char  return_type;
   char *function_name;
-  unsigned int varargs;
+  int varargs;
   unsigned int argc;
   unsigned int flags;
   char  arg_type [MAX_FUNCTION_ARGS];
diff --git a/tools/wrc/readres.c b/tools/wrc/readres.c
index 6a7d19f..32788e5 100644
--- a/tools/wrc/readres.c
+++ b/tools/wrc/readres.c
@@ -233,7 +233,7 @@
 			str = new_string();
 			str->type = str_unicode;
 			str->size = (idx - tag) / 2;
-			str->str.wstr = (short *)xmalloc(idx-tag+2);
+			str->str.wstr = xmalloc(idx-tag+2);
 			memcpy(str->str.wstr, &res->data[tag], idx-tag);
 			str->str.wstr[str->size] = 0;
 			type = new_name_id();
@@ -267,7 +267,7 @@
 			str = new_string();
 			str->type = str_unicode;
 			str->size = (idx - tag) / 2;
-			str->str.wstr = (short *)xmalloc(idx-tag+2);
+			str->str.wstr = xmalloc(idx-tag+2);
 			memcpy(str->str.wstr, &res->data[tag], idx-tag);
 			str->str.wstr[str->size] = 0;
 			name = new_name_id();