From e1e761d55fd3b5143ff3b10541006a04bdf8f64e Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Fri, 27 Aug 2021 22:46:36 +0200 Subject: [PATCH] dbghelp: Remove superfluous casts to self. Signed-off-by: Michael Stefaniuc Signed-off-by: Alexandre Julliard --- dlls/dbghelp/dwarf.c | 2 +- dlls/dbghelp/module.c | 2 +- dlls/dbghelp/pe_module.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/dbghelp/dwarf.c b/dlls/dbghelp/dwarf.c index 53274c4f597..ad9f5ec4fdf 100644 --- a/dlls/dbghelp/dwarf.c +++ b/dlls/dbghelp/dwarf.c @@ -3167,7 +3167,7 @@ static ULONG_PTR eval_expression(const struct module* module, struct cpu_stack_w case 1: stack[sp] = *(unsigned char*)&tmp; break; case 2: stack[sp] = *(unsigned short*)&tmp; break; case 4: stack[sp] = *(unsigned int*)&tmp; break; - case 8: stack[sp] = *(ULONG_PTR*)&tmp; break; /* FIXME: won't work on 32bit platform */ + case 8: stack[sp] = tmp; break; /* FIXME: won't work on 32bit platform */ default: FIXME("Unknown size for deref 0x%lx\n", sz); } break; diff --git a/dlls/dbghelp/module.c b/dlls/dbghelp/module.c index 247aadcef0e..0a4d3c0b145 100644 --- a/dlls/dbghelp/module.c +++ b/dlls/dbghelp/module.c @@ -677,7 +677,7 @@ BOOL image_check_alternate(struct image_file_map* fmap, const struct module* mod const char* dbg_link; found = TRUE; - dbg_link = (const char*)image_map_section(&debuglink_sect); + dbg_link = image_map_section(&debuglink_sect); if (dbg_link != IMAGE_NO_MAP) { /* The content of a debug link section is: diff --git a/dlls/dbghelp/pe_module.c b/dlls/dbghelp/pe_module.c index 5849b33a244..f0ca20e5e4f 100644 --- a/dlls/dbghelp/pe_module.c +++ b/dlls/dbghelp/pe_module.c @@ -428,7 +428,7 @@ static BOOL pe_load_coff_symbol_table(struct module* module) if (!fmap->u.pe.ntheader.FileHeader.PointerToSymbolTable || !numsym) return TRUE; if (!(mapping = pe_map_full(fmap, NULL))) return FALSE; - isym = (const IMAGE_SYMBOL*)((const char*)mapping + fmap->u.pe.ntheader.FileHeader.PointerToSymbolTable); + isym = (const IMAGE_SYMBOL*)(mapping + fmap->u.pe.ntheader.FileHeader.PointerToSymbolTable); /* FIXME: no way to get strtable size */ strtable = (const char*)&isym[numsym]; sect = IMAGE_FIRST_SECTION(RtlImageNtHeader((HMODULE)mapping));