Fix gcc 4.0 warnings.

This commit is contained in:
Mike McCormack 2005-09-02 14:47:36 +00:00 committed by Alexandre Julliard
parent ce20722109
commit b5bd4a101a
10 changed files with 37 additions and 36 deletions

View File

@ -882,15 +882,15 @@ static BOOL elf_load_debug_info_from_map(struct module* module,
else if (debug_sect != -1)
{
/* Dwarf 2 debug information */
const char* dw2_debug;
const char* dw2_debug_abbrev;
const char* dw2_debug_str;
const BYTE* dw2_debug;
const BYTE* dw2_debug_abbrev;
const BYTE* dw2_debug_str;
FIXME("Alpha-support for Dwarf2 information for %s\n", module->module.ModuleName);
dw2_debug = elf_map_section(fmap, debug_sect);
dw2_debug_abbrev = elf_map_section(fmap, debug_abbrev_sect);
dw2_debug_str = elf_map_section(fmap, debug_str_sect);
dw2_debug = (const BYTE*) elf_map_section(fmap, debug_sect);
dw2_debug_abbrev = (const BYTE*) elf_map_section(fmap, debug_abbrev_sect);
dw2_debug_str = (const BYTE*) elf_map_section(fmap, debug_str_sect);
if (dw2_debug != NO_MAP && NO_MAP != dw2_debug_abbrev && dw2_debug_str != NO_MAP)
{
/* OK, now just parse dwarf2 debug infos. */

View File

@ -76,7 +76,7 @@ static WINE_EXCEPTION_FILTER(page_fault)
static void dump(const void* ptr, unsigned len)
{
int i, j;
BYTE msg[128];
char msg[128];
const char* hexof = "0123456789abcdef";
const BYTE* x = (const BYTE*)ptr;
@ -741,11 +741,11 @@ static int codeview_new_func_signature(struct module* module, unsigned typeno,
return codeview_add_type(typeno, symt);
}
static int codeview_parse_type_table(struct module* module, const char* table,
static int codeview_parse_type_table(struct module* module, const BYTE* table,
int len)
{
unsigned int curr_type = 0x1000;
const char* ptr = table;
const BYTE* ptr = table;
int retv;
const union codeview_type* type;
int value, leaf_len;
@ -846,7 +846,7 @@ static int codeview_parse_type_table(struct module* module, const char* table,
* type of the corresponding sort. Later on, the definition of
* the 'real' type will copy the member / enumeration data.
*/
const char* list = type->fieldlist.list;
const unsigned char* list = type->fieldlist.list;
int len = (ptr + type->generic.len + 2) - list;
if (((const union codeview_fieldtype*)list)->generic.id == LF_ENUMERATE_V1 ||
@ -970,7 +970,7 @@ static int codeview_parse_type_table(struct module* module, const char* table,
*/
static struct codeview_linetab* codeview_snarf_linetab(struct module* module,
const char* linetab, int size,
const BYTE* linetab, int size,
BOOL pascal_str)
{
int file_segcount;
@ -992,7 +992,7 @@ static struct codeview_linetab* codeview_snarf_linetab(struct module* module,
/*
* Now get the important bits.
*/
pnt.c = linetab;
pnt.uc = linetab;
nfile = *pnt.s++;
nseg = *pnt.s++;
@ -1004,7 +1004,7 @@ static struct codeview_linetab* codeview_snarf_linetab(struct module* module,
nseg = 0;
for (i = 0; i < nfile; i++)
{
pnt2.c = linetab + filetab[i];
pnt2.uc = linetab + filetab[i];
nseg += *pnt2.s;
}
@ -1033,7 +1033,7 @@ static struct codeview_linetab* codeview_snarf_linetab(struct module* module,
/*
* Get the pointer into the segment information.
*/
pnt2.c = linetab + filetab[i];
pnt2.uc = linetab + filetab[i];
file_segcount = *pnt2.s;
pnt2.ui++;
@ -1055,7 +1055,7 @@ static struct codeview_linetab* codeview_snarf_linetab(struct module* module,
for (k = 0; k < file_segcount; k++, this_seg++)
{
pnt2.c = linetab + lt_ptr[k];
pnt2.uc = linetab + lt_ptr[k];
lt_hdr[this_seg].start = start[k].start;
lt_hdr[this_seg].end = start[k].end;
lt_hdr[this_seg].compiland = compiland;
@ -1643,7 +1643,7 @@ static void* pdb_read_ds_file(const struct PDB_DS_HEADER* pdb,
return pdb_ds_read(pdb, block_list, toc->file_size[file_nr]);
}
static void* pdb_read_file(const BYTE* image, const struct pdb_lookup* pdb_lookup,
static void* pdb_read_file(const char* image, const struct pdb_lookup* pdb_lookup,
DWORD file_nr)
{
switch (pdb_lookup->kind)
@ -1795,7 +1795,7 @@ static HANDLE open_pdb_file(const struct process* pcs, const char* filename)
static void pdb_process_types(const struct msc_debug_info* msc_dbg,
const char* image, struct pdb_lookup* pdb_lookup)
{
char* types_image = NULL;
BYTE* types_image = NULL;
types_image = pdb_read_file(image, pdb_lookup, 2);
if (types_image)
@ -1995,7 +1995,7 @@ static BOOL pdb_process_internal(const struct process* pcs,
BOOL ret = FALSE;
HANDLE hFile, hMap = NULL;
char* image = NULL;
char* symbols_image = NULL;
BYTE* symbols_image = NULL;
TRACE("Processing PDB file %s\n", pdb_lookup->filename);
@ -2013,8 +2013,8 @@ static BOOL pdb_process_internal(const struct process* pcs,
if (symbols_image)
{
PDB_SYMBOLS symbols;
char* modimage;
char* file;
BYTE* modimage;
BYTE* file;
int header_size = 0;
pdb_convert_symbols_header(&symbols, &header_size, symbols_image);
@ -2072,7 +2072,7 @@ static BOOL pdb_process_internal(const struct process* pcs,
}
file_name = (const char*)file + size;
file_name += strlen(file_name) + 1;
file = (char*)((DWORD)(file_name + strlen(file_name) + 1 + 3) & ~3);
file = (BYTE*)((DWORD)(file_name + strlen(file_name) + 1 + 3) & ~3);
}
}
else

View File

@ -1185,6 +1185,7 @@ union codeview_symbol
union any_size
{
const char* c;
const unsigned char* uc;
const short* s;
const int* i;
const unsigned int* ui;

View File

@ -52,12 +52,12 @@ static BOOL pe_load_stabs(const struct process* pcs, struct module* module,
((char*)&nth->OptionalHeader + nth->FileHeader.SizeOfOptionalHeader);
for (i = 0; i < nth->FileHeader.NumberOfSections; i++, section++)
{
if (!strcasecmp(section->Name, ".stab"))
if (!strcasecmp((const char*)section->Name, ".stab"))
{
stabs = section->VirtualAddress;
stabsize = section->SizeOfRawData;
}
else if (!strncasecmp(section->Name, ".stabstr", 8))
else if (!strncasecmp((const char*)section->Name, ".stabstr", 8))
{
stabstr = section->VirtualAddress;
stabstrsize = section->SizeOfRawData;
@ -183,7 +183,7 @@ static BOOL pe_load_msc_debug_info(const struct process* pcs,
}
else
{
ret = pe_load_dbg_file(pcs, module, misc->Data, nth->FileHeader.TimeDateStamp);
ret = pe_load_dbg_file(pcs, module, (const char*)misc->Data, nth->FileHeader.TimeDateStamp);
}
}
else

View File

@ -1467,7 +1467,7 @@ static NTSTATUS CDROM_ScsiPassThroughDirect(int fd, PSCSI_PASS_THROUGH_DIRECT pP
cmd.dxfer_len = pPacket->DataTransferLength;
cmd.dxferp = pPacket->DataBuffer;
cmd.cmdp = pPacket->Cdb;
cmd.sbp = (char*)pPacket + pPacket->SenseInfoOffset;
cmd.sbp = (unsigned char*)pPacket + pPacket->SenseInfoOffset;
cmd.timeout = pPacket->TimeOutValue*1000;
switch (pPacket->DataIn)
@ -1591,7 +1591,7 @@ static NTSTATUS CDROM_ScsiPassThrough(int fd, PSCSI_PASS_THROUGH pPacket)
cmd.timeout = pPacket->TimeOutValue*1000;
if(cmd.mx_sb_len > 0)
cmd.sbp = (char*)pPacket + pPacket->SenseInfoOffset;
cmd.sbp = (unsigned char*)pPacket + pPacket->SenseInfoOffset;
switch (pPacket->DataIn)
{

View File

@ -515,7 +515,7 @@ static WINE_MODREF *import_dll( HMODULE module, const IMAGE_IMPORT_DESCRIPTOR *d
{
IMAGE_IMPORT_BY_NAME *pe_name = get_rva( module, (DWORD)import_list->u1.AddressOfData );
WARN("No implementation for %s.%s", name, pe_name->Name );
thunk_list->u1.Function = allocate_stub( name, pe_name->Name );
thunk_list->u1.Function = allocate_stub( name, (const char*)pe_name->Name );
}
WARN(" imported from %s, allocating stub %p\n",
debugstr_w(current_modref->ldr.FullDllName.Buffer),
@ -548,10 +548,10 @@ static WINE_MODREF *import_dll( HMODULE module, const IMAGE_IMPORT_DESCRIPTOR *d
IMAGE_IMPORT_BY_NAME *pe_name;
pe_name = get_rva( module, (DWORD)import_list->u1.AddressOfData );
thunk_list->u1.Function = (ULONG_PTR)find_named_export( imp_mod, exports, exp_size,
pe_name->Name, pe_name->Hint );
(const char*)pe_name->Name, pe_name->Hint );
if (!thunk_list->u1.Function)
{
thunk_list->u1.Function = allocate_stub( name, pe_name->Name );
thunk_list->u1.Function = allocate_stub( name, (const char*)pe_name->Name );
WARN("No implementation for %s.%s imported from %s, setting to %p\n",
name, pe_name->Name, debugstr_w(current_modref->ldr.FullDllName.Buffer),
(void *)thunk_list->u1.Function );
@ -1707,10 +1707,10 @@ NTSTATUS WINAPI LdrQueryProcessModuleInformation(PSYSTEM_MODULE_INFORMATION smi,
sm->Unknown = 0; /* FIXME */
str.Length = 0;
str.MaximumLength = MAXIMUM_FILENAME_LENGTH;
str.Buffer = sm->Name;
str.Buffer = (char*)sm->Name;
RtlUnicodeStringToAnsiString(&str, &mod->FullDllName, FALSE);
ptr = strrchr(sm->Name, '\\');
sm->NameOffset = (ptr != NULL) ? (ptr - (char*)sm->Name + 1) : 0;
ptr = strrchr(str.Buffer, '\\');
sm->NameOffset = (ptr != NULL) ? (ptr - str.Buffer + 1) : 0;
smi->ModulesCount++;
sm++;

View File

@ -497,7 +497,7 @@ NTSTATUS WINAPI NtRequestWaitReplyPort(
TRACE("\tMessageId = %lu\n",pLpcMessageIn->MessageId);
TRACE("\tSectionSize = %lu\n",pLpcMessageIn->SectionSize);
TRACE("\tData = %s\n",
debugstr_an(pLpcMessageIn->Data,pLpcMessageIn->DataSize));
debugstr_an((const char*)pLpcMessageIn->Data,pLpcMessageIn->DataSize));
}
return 0;
}

View File

@ -840,7 +840,7 @@ static void test_RtlComputeCrc32(void)
if (!pRtlComputeCrc32)
return;
crc = pRtlComputeCrc32(crc, src, LEN);
crc = pRtlComputeCrc32(crc, (LPBYTE)src, LEN);
ok(crc == 0x40861dc2,"Expected 0x40861dc2, got %8lx\n", crc);
}

View File

@ -757,7 +757,7 @@ void WINAPI RtlSecondsSince1980ToTime( DWORD Seconds, LARGE_INTEGER *Time )
void WINAPI RtlTimeToElapsedTimeFields( const LARGE_INTEGER *Time, PTIME_FIELDS TimeFields )
{
LONGLONG time;
UINT rem;
INT rem;
time = RtlExtendedLargeIntegerDivide( Time->QuadPart, TICKSPERSEC, &rem );
TimeFields->Milliseconds = rem / TICKSPERMSEC;

View File

@ -515,7 +515,7 @@ static UINT GRPFILE_WriteWithChecksum(HFILE file, LPCSTR str, UINT size)
static BOOL GRPFILE_DoWriteGroupFile(HFILE file, PROGGROUP *group)
{
BYTE buffer[34];
CHAR buffer[34];
HLOCAL hProgram;
INT NumProg, Title, Progs, Icons, Extension;
INT CurrProg, CurrIcon, nCmdShow, ptr, seqnum;