Fixed signedness warnings.

This commit is contained in:
Marcus Meissner 2005-07-10 17:45:53 +00:00 committed by Alexandre Julliard
parent 92f11aa780
commit 2d7e976eed
5 changed files with 8 additions and 8 deletions

View File

@ -305,7 +305,7 @@ static void *map_dll( const IMAGE_NT_HEADERS *nt_descr )
/* Build the code section */
strcpy( sec->Name, ".text" );
memcpy( sec->Name, ".text", sizeof(".text") );
sec->SizeOfRawData = data_start - code_start;
sec->Misc.VirtualSize = sec->SizeOfRawData;
sec->VirtualAddress = code_start;
@ -315,7 +315,7 @@ static void *map_dll( const IMAGE_NT_HEADERS *nt_descr )
/* Build the data section */
strcpy( sec->Name, ".data" );
memcpy( sec->Name, ".data", sizeof(".data") );
sec->SizeOfRawData = data_end - data_start;
sec->Misc.VirtualSize = sec->SizeOfRawData;
sec->VirtualAddress = data_start;

View File

@ -142,7 +142,7 @@ static void get_string( struct string_id *str )
}
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()));

View File

@ -207,7 +207,7 @@ static void load_next_resource( DLLSPEC *spec )
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 );
}

View File

@ -78,13 +78,13 @@ const char *get_typename(const resource_t* r)
* 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++;
}

View File

@ -1784,7 +1784,7 @@ char *prep_nid_for_label(const name_id_t *nid)
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';