Commit 723ee0a3 authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

gcc 4.0 -Wpointer-sign fixes.

parent 60f85433
...@@ -74,7 +74,7 @@ static const struct IAVIStreamVtbl iacmst = { ...@@ -74,7 +74,7 @@ static const struct IAVIStreamVtbl iacmst = {
typedef struct _IAVIStreamImpl { typedef struct _IAVIStreamImpl {
/* IUnknown stuff */ /* IUnknown stuff */
const IAVIStreamVtbl *lpVtbl; const IAVIStreamVtbl *lpVtbl;
DWORD ref; LONG ref;
/* IAVIStream stuff */ /* IAVIStream stuff */
PAVISTREAM pStream; PAVISTREAM pStream;
......
...@@ -149,7 +149,7 @@ typedef struct _IPersistFileImpl { ...@@ -149,7 +149,7 @@ typedef struct _IPersistFileImpl {
typedef struct _IAVIStreamImpl { typedef struct _IAVIStreamImpl {
/* IUnknown stuff */ /* IUnknown stuff */
const IAVIStreamVtbl *lpVtbl; const IAVIStreamVtbl *lpVtbl;
DWORD ref; LONG ref;
/* IAVIStream stuff */ /* IAVIStream stuff */
IAVIFileImpl *paf; IAVIFileImpl *paf;
...@@ -178,7 +178,7 @@ typedef struct _IAVIStreamImpl { ...@@ -178,7 +178,7 @@ typedef struct _IAVIStreamImpl {
struct _IAVIFileImpl { struct _IAVIFileImpl {
/* IUnknown stuff */ /* IUnknown stuff */
const IAVIFileVtbl *lpVtbl; const IAVIFileVtbl *lpVtbl;
DWORD ref; LONG ref;
/* IAVIFile stuff... */ /* IAVIFile stuff... */
IPersistFileImpl iPersistFile; IPersistFileImpl iPersistFile;
......
...@@ -165,7 +165,7 @@ typedef struct _IEditStreamInternalImpl { ...@@ -165,7 +165,7 @@ typedef struct _IEditStreamInternalImpl {
struct _IAVIEditStreamImpl { struct _IAVIEditStreamImpl {
/* IUnknown stuff */ /* IUnknown stuff */
const IAVIEditStreamVtbl *lpVtbl; const IAVIEditStreamVtbl *lpVtbl;
DWORD ref; LONG ref;
/* IAVIEditStream stuff */ /* IAVIEditStream stuff */
IEditAVIStreamImpl iAVIStream; IEditAVIStreamImpl iAVIStream;
......
...@@ -67,7 +67,7 @@ static const struct IGetFrameVtbl igetframeVtbl = { ...@@ -67,7 +67,7 @@ static const struct IGetFrameVtbl igetframeVtbl = {
typedef struct _IGetFrameImpl { typedef struct _IGetFrameImpl {
/* IUnknown stuff */ /* IUnknown stuff */
const IGetFrameVtbl *lpVtbl; const IGetFrameVtbl *lpVtbl;
DWORD ref; LONG ref;
/* IGetFrame stuff */ /* IGetFrame stuff */
BOOL bFixedStream; BOOL bFixedStream;
......
...@@ -77,7 +77,7 @@ static const struct IAVIStreamVtbl iicmst = { ...@@ -77,7 +77,7 @@ static const struct IAVIStreamVtbl iicmst = {
typedef struct _IAVIStreamImpl { typedef struct _IAVIStreamImpl {
/* IUnknown stuff */ /* IUnknown stuff */
const IAVIStreamVtbl *lpVtbl; const IAVIStreamVtbl *lpVtbl;
DWORD ref; LONG ref;
/* IAVIStream stuff */ /* IAVIStream stuff */
PAVISTREAM pStream; PAVISTREAM pStream;
......
...@@ -66,7 +66,7 @@ static const struct IAVIFileVtbl itmpft = { ...@@ -66,7 +66,7 @@ static const struct IAVIFileVtbl itmpft = {
typedef struct _ITmpFileImpl { typedef struct _ITmpFileImpl {
/* IUnknown stuff */ /* IUnknown stuff */
const IAVIFileVtbl *lpVtbl; const IAVIFileVtbl *lpVtbl;
DWORD ref; LONG ref;
/* IAVIFile stuff */ /* IAVIFile stuff */
AVIFILEINFOW fInfo; AVIFILEINFOW fInfo;
......
...@@ -187,7 +187,7 @@ typedef struct _IAVIStreamImpl { ...@@ -187,7 +187,7 @@ typedef struct _IAVIStreamImpl {
struct _IAVIFileImpl { struct _IAVIFileImpl {
/* IUnknown stuff */ /* IUnknown stuff */
const IAVIFileVtbl *lpVtbl; const IAVIFileVtbl *lpVtbl;
DWORD ref; LONG ref;
/* IAVIFile, IAVIStream stuff... */ /* IAVIFile, IAVIStream stuff... */
IPersistFileImpl iPersistFile; IPersistFileImpl iPersistFile;
......
...@@ -123,7 +123,7 @@ static void fill_fontinfo(FT_Face face, int enc, FILE *fp, int dpi, unsigned cha ...@@ -123,7 +123,7 @@ static void fill_fontinfo(FT_Face face, int enc, FILE *fp, int dpi, unsigned cha
DWORD start; DWORD start;
CHAR_TABLE_ENTRY *dfCharTable; CHAR_TABLE_ENTRY *dfCharTable;
int i, x, y, x_off, x_end, first_char; int i, x, y, x_off, x_end, first_char;
FT_Int gi; FT_UInt gi;
int num_names; int num_names;
const union cptable *cptable; const union cptable *cptable;
FT_SfntName sfntname; FT_SfntName sfntname;
......
...@@ -398,7 +398,7 @@ void BuildSpec16File( FILE *outfile, DLLSPEC *spec ) ...@@ -398,7 +398,7 @@ void BuildSpec16File( FILE *outfile, DLLSPEC *spec )
ORDDEF **type, **typelist; ORDDEF **type, **typelist;
int i, nFuncs, nTypes; int i, nFuncs, nTypes;
unsigned char *resdir_buffer, *resdata_buffer, *et_buffer, *data_buffer; 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 ne_offset, segtable_offset, impnames_offset;
unsigned int entrypoint_size, callfrom_size; unsigned int entrypoint_size, callfrom_size;
unsigned int code_size, code_offset; unsigned int code_size, code_offset;
......
...@@ -288,7 +288,7 @@ static void dump_le_objects( const void *base, const IMAGE_VXD_HEADER *le ) ...@@ -288,7 +288,7 @@ static void dump_le_objects( const void *base, const IMAGE_VXD_HEADER *le )
static void dump_le_names( const void *base, const IMAGE_VXD_HEADER *le ) 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" ); printf( "\nResident name table:\n" );
while (*pstr) while (*pstr)
...@@ -300,7 +300,7 @@ static void dump_le_names( const void *base, const IMAGE_VXD_HEADER *le ) ...@@ -300,7 +300,7 @@ static void dump_le_names( const void *base, const IMAGE_VXD_HEADER *le )
if (le->e32_cbnrestab) if (le->e32_cbnrestab)
{ {
printf( "\nNon-resident name table:\n" ); printf( "\nNon-resident name table:\n" );
pstr = (char *)base + le->e32_nrestab; pstr = (unsigned char *)base + le->e32_nrestab;
while (*pstr) while (*pstr)
{ {
printf( " %4d: %*.*s\n", get_word(pstr + *pstr + 1), *pstr, *pstr, printf( " %4d: %*.*s\n", get_word(pstr + *pstr + 1), *pstr, *pstr,
......
...@@ -312,9 +312,10 @@ static const unsigned char table_dec85[0x80] = { ...@@ -312,9 +312,10 @@ static const unsigned char table_dec85[0x80] = {
0x47,0x48,0x49,0x4a,0x4b,0x4c,0x4d,0x4e,0x4f,0x50,0x51,0x52,0xff,0x53,0x54,0xff, 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; DWORD i, val = 0, base = 1, *p;
unsigned char ch;
p = (DWORD*) guid; p = (DWORD*) guid;
for( i=0; i<20; i++ ) for( i=0; i<20; i++ )
...@@ -324,10 +325,11 @@ static int base85_to_guid( const unsigned char *str, LPGUID guid ) ...@@ -324,10 +325,11 @@ static int base85_to_guid( const unsigned char *str, LPGUID guid )
val = 0; val = 0;
base = 1; base = 1;
} }
val += table_dec85[str[i]] * base; ch = str[i];
if( str[i] >= 0x80 ) if( ch >= 0x80 )
return 0; return 0;
if( table_dec85[str[i]] == 0xff ) val += table_dec85[ch] * base;
if( table_dec85[ch] == 0xff )
return 0; return 0;
if( (i%5) == 4 ) if( (i%5) == 4 )
p[i/5] = val; p[i/5] = val;
......
...@@ -97,7 +97,7 @@ static void dump_ne_header( const IMAGE_OS2_HEADER *ne ) ...@@ -97,7 +97,7 @@ static void dump_ne_header( const IMAGE_OS2_HEADER *ne )
static void dump_ne_names( const void *base, const IMAGE_OS2_HEADER *ne ) 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" ); printf( "\nResident name table:\n" );
while (*pstr) while (*pstr)
...@@ -108,7 +108,7 @@ static void dump_ne_names( const void *base, const IMAGE_OS2_HEADER *ne ) ...@@ -108,7 +108,7 @@ static void dump_ne_names( const void *base, const IMAGE_OS2_HEADER *ne )
if (ne->ne_cbnrestab) if (ne->ne_cbnrestab)
{ {
printf( "\nNon-resident name table:\n" ); printf( "\nNon-resident name table:\n" );
pstr = (char *)base + ne->ne_nrestab; pstr = (unsigned char *)base + ne->ne_nrestab;
while (*pstr) while (*pstr)
{ {
printf( " %4d: %*.*s\n", get_word(pstr + *pstr + 1), *pstr, *pstr, pstr + 1 ); printf( " %4d: %*.*s\n", get_word(pstr + *pstr + 1), *pstr, *pstr, pstr + 1 );
......
...@@ -82,7 +82,7 @@ typedef struct __parsed_symbol ...@@ -82,7 +82,7 @@ typedef struct __parsed_symbol
char *return_text; char *return_text;
char return_type; char return_type;
char *function_name; char *function_name;
unsigned int varargs; int varargs;
unsigned int argc; unsigned int argc;
unsigned int flags; unsigned int flags;
char arg_type [MAX_FUNCTION_ARGS]; char arg_type [MAX_FUNCTION_ARGS];
......
...@@ -233,7 +233,7 @@ static resource_t *read_res32(FILE *fp) ...@@ -233,7 +233,7 @@ static resource_t *read_res32(FILE *fp)
str = new_string(); str = new_string();
str->type = str_unicode; str->type = str_unicode;
str->size = (idx - tag) / 2; 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); memcpy(str->str.wstr, &res->data[tag], idx-tag);
str->str.wstr[str->size] = 0; str->str.wstr[str->size] = 0;
type = new_name_id(); type = new_name_id();
...@@ -267,7 +267,7 @@ static resource_t *read_res32(FILE *fp) ...@@ -267,7 +267,7 @@ static resource_t *read_res32(FILE *fp)
str = new_string(); str = new_string();
str->type = str_unicode; str->type = str_unicode;
str->size = (idx - tag) / 2; 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); memcpy(str->str.wstr, &res->data[tag], idx-tag);
str->str.wstr[str->size] = 0; str->str.wstr[str->size] = 0;
name = new_name_id(); name = new_name_id();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment