PATCH: tools/ signedness fixes
Marcus Meissner
marcus at jet.franken.de
Sun Jul 10 04:35:22 CDT 2005
Hi,
This fixes signedness warnings in tools/
Ciao, Marcus
Changelog:
Fixed signedness warnings in tools/ subdirs.
Index: tools/winebuild/res16.c
===================================================================
RCS file: /home/wine/wine/tools/winebuild/res16.c,v
retrieving revision 1.15
diff -u -r1.15 res16.c
--- tools/winebuild/res16.c 20 May 2005 19:19:01 -0000 1.15
+++ tools/winebuild/res16.c 10 Jul 2005 09:34:18 -0000
@@ -142,7 +142,7 @@
}
else
{
- char *p = xmalloc( (strlen(file_pos) + 1) );
+ char *p = xmalloc( (strlen((char*)file_pos) + 1) );
str->str = p;
str->id = 0;
while ((*p++ = get_byte()));
Index: tools/winebuild/res32.c
===================================================================
RCS file: /home/wine/wine/tools/winebuild/res32.c,v
retrieving revision 1.18
diff -u -r1.18 res32.c
--- tools/winebuild/res32.c 5 Jun 2005 18:36:24 -0000 1.18
+++ tools/winebuild/res32.c 10 Jul 2005 09:34:18 -0000
@@ -207,7 +207,7 @@
get_dword(); /* skip version */
get_dword(); /* skip characteristics */
- file_pos = (const char *)res->data + res->data_size;
+ file_pos = (const unsigned char *)res->data + res->data_size;
if (file_pos > file_end) fatal_error( "%s is a truncated file\n", file_name );
}
Index: tools/wrc/dumpres.c
===================================================================
RCS file: /home/wine/wine/tools/wrc/dumpres.c,v
retrieving revision 1.18
diff -u -r1.18 dumpres.c
--- tools/wrc/dumpres.c 6 Dec 2004 16:44:32 -0000 1.18
+++ tools/wrc/dumpres.c 10 Jul 2005 09:34:19 -0000
@@ -78,13 +78,13 @@
* Remarks : No codepage translation is done.
*****************************************************************************
*/
-static char *strncpyWtoA(char *cs, const short *ws, int maxlen)
+static char *strncpyWtoA(char *cs, const WCHAR *ws, int maxlen)
{
char *cptr = cs;
- const short *wsMax = ws + maxlen - 1;
+ const WCHAR *wsMax = ws + maxlen - 1;
while(*ws && ws < wsMax)
{
- if(*ws < -128 || *ws > 127)
+ if(*ws > 255)
fprintf(stderr, "***Warning: Unicode string contains non-printable chars***\n");
*cptr++ = (char)*ws++;
}
Index: tools/wrc/genres.c
===================================================================
RCS file: /home/wine/wine/tools/wrc/genres.c,v
retrieving revision 1.27
diff -u -r1.27 genres.c
--- tools/wrc/genres.c 30 Jun 2005 20:58:52 -0000 1.27
+++ tools/wrc/genres.c 10 Jul 2005 09:34:19 -0000
@@ -1784,7 +1784,7 @@
if(nid->type == name_str && nid->name.s_name->type == str_unicode)
{
- short *sptr;
+ WCHAR *sptr;
int i;
sptr = nid->name.s_name->str.wstr;
buf[0] = '\0';
More information about the wine-patches
mailing list