From f2223dbe79295ff1b343735fb3c8dbbc9de3349d Mon Sep 17 00:00:00 2001 From: Andrew Talbot Date: Tue, 4 Dec 2007 21:45:11 +0000 Subject: [PATCH] dbghelp: Remove unneeded casts. --- dlls/dbghelp/dbghelp.c | 6 +++--- dlls/dbghelp/module.c | 2 +- dlls/dbghelp/msc.c | 2 +- dlls/dbghelp/stack.c | 14 +++++++------- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/dlls/dbghelp/dbghelp.c b/dlls/dbghelp/dbghelp.c index 7ecc3c9ab8f..dc3b86a35db 100644 --- a/dlls/dbghelp/dbghelp.c +++ b/dlls/dbghelp/dbghelp.c @@ -214,7 +214,7 @@ BOOL WINAPI SymGetSearchPath(HANDLE hProcess, PSTR szSearchPath, static BOOL WINAPI process_invade_cb(PCSTR name, ULONG base, ULONG size, PVOID user) { char tmp[MAX_PATH]; - HANDLE hProcess = (HANDLE)user; + HANDLE hProcess = user; if (!GetModuleFileNameExA(hProcess, (HMODULE)base, tmp, sizeof(tmp))) @@ -320,7 +320,7 @@ BOOL WINAPI SymInitializeW(HANDLE hProcess, PCWSTR UserSearchPath, BOOL fInvadeP if (check_live_target(pcs)) { if (fInvadeProcess) - EnumerateLoadedModules(hProcess, process_invade_cb, (void*)hProcess); + EnumerateLoadedModules(hProcess, process_invade_cb, hProcess); elf_synchronize_module_list(pcs); } else if (fInvadeProcess) @@ -488,7 +488,7 @@ static BOOL CALLBACK reg_cb64to32(HANDLE hProcess, ULONG action, ULONG64 data, U FIXME("No mapping for action %u\n", action); return FALSE; } - return cb32(hProcess, action, (PVOID)data32, (PVOID)user32); + return cb32(hProcess, action, data32, (PVOID)user32); } /****************************************************************** diff --git a/dlls/dbghelp/module.c b/dlls/dbghelp/module.c index f3c5e15ecd6..8b2ece0be2f 100644 --- a/dlls/dbghelp/module.c +++ b/dlls/dbghelp/module.c @@ -581,7 +581,7 @@ BOOL module_remove(struct process* pcs, struct module* module) TRACE("%s (%p)\n", debugstr_w(module->module.ModuleName), module); hash_table_destroy(&module->ht_symbols); hash_table_destroy(&module->ht_types); - HeapFree(GetProcessHeap(), 0, (char*)module->sources); + HeapFree(GetProcessHeap(), 0, module->sources); HeapFree(GetProcessHeap(), 0, module->addr_sorttab); HeapFree(GetProcessHeap(), 0, module->dwarf2_info); pool_destroy(&module->pool); diff --git a/dlls/dbghelp/msc.c b/dlls/dbghelp/msc.c index e6542e9371f..c04fa798254 100644 --- a/dlls/dbghelp/msc.c +++ b/dlls/dbghelp/msc.c @@ -174,7 +174,7 @@ static int numeric_leaf(int* value, const unsigned short int* leaf) case LF_USHORT: length += 2; - *value = *(const unsigned short*)leaf; + *value = *leaf; break; case LF_LONG: diff --git a/dlls/dbghelp/stack.c b/dlls/dbghelp/stack.c index 1eefbb82ca5..9b70f09a13a 100644 --- a/dlls/dbghelp/stack.c +++ b/dlls/dbghelp/stack.c @@ -552,15 +552,15 @@ BOOL WINAPI StackWalk64(DWORD MachineType, HANDLE hProcess, HANDLE hThread, addr_32to64(&frame32.AddrStack, &frame64->AddrStack); addr_32to64(&frame32.AddrBStore, &frame64->AddrBStore); frame64->FuncTableEntry = frame32.FuncTableEntry; /* FIXME */ - frame64->Params[0] = (ULONG)frame32.Params[0]; - frame64->Params[1] = (ULONG)frame32.Params[1]; - frame64->Params[2] = (ULONG)frame32.Params[2]; - frame64->Params[3] = (ULONG)frame32.Params[3]; + frame64->Params[0] = frame32.Params[0]; + frame64->Params[1] = frame32.Params[1]; + frame64->Params[2] = frame32.Params[2]; + frame64->Params[3] = frame32.Params[3]; frame64->Far = frame32.Far; frame64->Virtual = frame32.Virtual; - frame64->Reserved[0] = (ULONG)frame32.Reserved[0]; - frame64->Reserved[1] = (ULONG)frame32.Reserved[1]; - frame64->Reserved[2] = (ULONG)frame32.Reserved[2]; + frame64->Reserved[0] = frame32.Reserved[0]; + frame64->Reserved[1] = frame32.Reserved[1]; + frame64->Reserved[2] = frame32.Reserved[2]; /* we don't handle KdHelp */ frame64->KdHelp.Thread = 0xC000FADE; frame64->KdHelp.ThCallbackStack = 0x10;