Module: wine Branch: master Commit: 3c3a9b50812a4e2ca967e1158f286a4e4bab059b URL: http://source.winehq.org/git/wine.git/?a=commit;h=3c3a9b50812a4e2ca967e1158f...
Author: Michael Stefaniuc mstefani@redhat.de Date: Mon Jan 19 10:24:06 2009 +0100
dbghelp: Remove superfluous pointer casts.
---
dlls/dbghelp/dwarf.c | 2 +- dlls/dbghelp/minidump.c | 8 ++++---- dlls/dbghelp/msc.c | 6 +++--- dlls/dbghelp/path.c | 10 +++++----- dlls/dbghelp/pe_module.c | 2 +- dlls/dbghelp/symbol.c | 8 ++++---- 6 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/dlls/dbghelp/dwarf.c b/dlls/dbghelp/dwarf.c index 3667c67..44e2cad 100644 --- a/dlls/dbghelp/dwarf.c +++ b/dlls/dbghelp/dwarf.c @@ -72,7 +72,7 @@ static void dump(const void* ptr, unsigned len) int i, j; BYTE msg[128]; static const char hexof[] = "0123456789abcdef"; - const BYTE* x = (const BYTE*)ptr; + const BYTE* x = ptr;
for (i = 0; i < len; i += 16) { diff --git a/dlls/dbghelp/minidump.c b/dlls/dbghelp/minidump.c index 0419bc8..da0632a 100644 --- a/dlls/dbghelp/minidump.c +++ b/dlls/dbghelp/minidump.c @@ -282,13 +282,13 @@ static BOOL add_module(struct dump_context* dc, const WCHAR* name, static BOOL WINAPI fetch_pe_module_info_cb(PCWSTR name, DWORD64 base, ULONG size, PVOID user) { - struct dump_context* dc = (struct dump_context*)user; + struct dump_context* dc = user; IMAGE_NT_HEADERS nth;
if (!validate_addr64(base)) return FALSE;
if (pe_load_nt_header(dc->hProcess, base, &nth)) - add_module((struct dump_context*)user, name, base, size, + add_module(user, name, base, size, nth.FileHeader.TimeDateStamp, nth.OptionalHeader.CheckSum, FALSE); return TRUE; @@ -302,7 +302,7 @@ static BOOL WINAPI fetch_pe_module_info_cb(PCWSTR name, DWORD64 base, ULONG size static BOOL fetch_elf_module_info_cb(const WCHAR* name, unsigned long base, void* user) { - struct dump_context* dc = (struct dump_context*)user; + struct dump_context* dc = user; DWORD rbase, size, checksum;
/* FIXME: there's no relevant timestamp on ELF modules */ @@ -971,7 +971,7 @@ BOOL WINAPI MiniDumpReadDumpStream(PVOID base, ULONG str_idx, PMINIDUMP_DIRECTORY* pdir, PVOID* stream, ULONG* size) { - MINIDUMP_HEADER* mdHead = (MINIDUMP_HEADER*)base; + MINIDUMP_HEADER* mdHead = base;
if (mdHead->Signature == MINIDUMP_SIGNATURE) { diff --git a/dlls/dbghelp/msc.c b/dlls/dbghelp/msc.c index 564e745..f894afb 100644 --- a/dlls/dbghelp/msc.c +++ b/dlls/dbghelp/msc.c @@ -71,7 +71,7 @@ static void dump(const void* ptr, unsigned len) unsigned int i, j; char msg[128]; const char* hexof = "0123456789abcdef"; - const BYTE* x = (const BYTE*)ptr; + const BYTE* x = ptr;
for (i = 0; i < len; i += 16) { @@ -2150,7 +2150,7 @@ static void pdb_convert_symbol_file(const PDB_SYMBOLS* symbols, { if (symbols->version < 19970000) { - const PDB_SYMBOL_FILE *sym_file = (const PDB_SYMBOL_FILE*)image; + const PDB_SYMBOL_FILE *sym_file = image; memset(sfile, 0, sizeof(*sfile)); sfile->file = sym_file->file; sfile->range.index = sym_file->range.index; @@ -2385,7 +2385,7 @@ static void pdb_process_symbol_imports(const struct process* pcs, imp = (const PDB_SYMBOL_IMPORT*)((const char*)symbols_image + sizeof(PDB_SYMBOLS) + symbols->module_size + symbols->offset_size + symbols->hash_size + symbols->srcmodule_size); - first = (const char*)imp; + first = imp; last = (const char*)imp + symbols->pdbimport_size; while (imp < (const PDB_SYMBOL_IMPORT*)last) { diff --git a/dlls/dbghelp/path.c b/dlls/dbghelp/path.c index e0cfc97..6af51d0 100644 --- a/dlls/dbghelp/path.c +++ b/dlls/dbghelp/path.c @@ -234,7 +234,7 @@ static BOOL do_searchW(PCWSTR file, PWSTR buffer, BOOL recurse, strcpyW(buffer + pos, fd.cFileName); if (recurse && (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) found = do_searchW(file, buffer, TRUE, cb, user); - else if (SymMatchFileNameW(buffer, (WCHAR*)file, NULL, NULL)) + else if (SymMatchFileNameW(buffer, file, NULL, NULL)) { if (!cb || cb(buffer, user)) found = TRUE; } @@ -340,13 +340,13 @@ struct sffip */ static BOOL CALLBACK sffip_cb(PCWSTR buffer, PVOID user) { - struct sffip* s = (struct sffip*)user; + struct sffip* s = user;
if (!s->cb) return TRUE; /* yes, EnumDirTree/do_search and SymFindFileInPath callbacks use the opposite * convention to stop/continue enumeration. sigh. */ - return !(s->cb)((WCHAR*)buffer, s->user); + return !(s->cb)(buffer, s->user); }
/****************************************************************** @@ -461,7 +461,7 @@ struct module_find */ static BOOL CALLBACK module_find_cb(PCWSTR buffer, PVOID user) { - struct module_find* mf = (struct module_find*)user; + struct module_find* mf = user; DWORD size, checksum, timestamp; unsigned matched = 0;
@@ -580,7 +580,7 @@ static BOOL CALLBACK module_find_cb(PCWSTR buffer, PVOID user) if ((mapping = MapViewOfFile(hMap, FILE_MAP_READ, 0, 0, 0)) != NULL) { const IMAGE_SEPARATE_DEBUG_HEADER* hdr; - hdr = (const IMAGE_SEPARATE_DEBUG_HEADER*)mapping; + hdr = mapping;
if (hdr->Signature == IMAGE_SEPARATE_DEBUG_SIGNATURE) { diff --git a/dlls/dbghelp/pe_module.c b/dlls/dbghelp/pe_module.c index a79396f..4e77790 100644 --- a/dlls/dbghelp/pe_module.c +++ b/dlls/dbghelp/pe_module.c @@ -435,7 +435,7 @@ PVOID WINAPI ImageDirectoryEntryToDataEx( PVOID base, BOOLEAN image, USHORT dir, *size = nt->OptionalHeader.DataDirectory[dir].Size; if (image || addr < nt->OptionalHeader.SizeOfHeaders) return (char *)base + addr;
- return RtlImageRvaToVa( nt, (HMODULE)base, addr, section ); + return RtlImageRvaToVa( nt, base, addr, section ); }
/*********************************************************************** diff --git a/dlls/dbghelp/symbol.c b/dlls/dbghelp/symbol.c index 280666d..4df69d1 100644 --- a/dlls/dbghelp/symbol.c +++ b/dlls/dbghelp/symbol.c @@ -1046,7 +1046,7 @@ struct sym_enumerate
static BOOL CALLBACK sym_enumerate_cb(PSYMBOL_INFO syminfo, ULONG size, void* ctx) { - struct sym_enumerate* se = (struct sym_enumerate*)ctx; + struct sym_enumerate* se = ctx; return (se->cb)(syminfo->Name, syminfo->Address, syminfo->Size, se->ctx); }
@@ -1073,7 +1073,7 @@ struct sym_enumerate64
static BOOL CALLBACK sym_enumerate_cb64(PSYMBOL_INFO syminfo, ULONG size, void* ctx) { - struct sym_enumerate64* se = (struct sym_enumerate64*)ctx; + struct sym_enumerate64* se = ctx; return (se->cb)(syminfo->Name, syminfo->Address, syminfo->Size, se->ctx); }
@@ -1473,7 +1473,7 @@ BOOL WINAPI SymGetLinePrev(HANDLE hProcess, PIMAGEHLP_LINE Line) if (!module_get_debug(&pair)) return FALSE;
if (Line->Key == 0) return FALSE; - li = (struct line_info*)Line->Key; + li = Line->Key; /* things are a bit complicated because when we encounter a DLIT_SOURCEFILE * element we have to go back until we find the prev one to get the real * source file name for the DLIT_OFFSET element just before @@ -1523,7 +1523,7 @@ BOOL symt_get_func_line_next(const struct module* module, PIMAGEHLP_LINE line) struct line_info* li;
if (line->Key == 0) return FALSE; - li = (struct line_info*)line->Key; + li = line->Key; while (!li->is_last) { li++;