From d17bc39b1fa51d46988872da11c69c04fd22e0fe Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 29 May 2012 19:14:31 +0200 Subject: [PATCH] winedbg: Fix some pointer conversion warnings. --- programs/winedbg/be_x86_64.c | 3 +-- programs/winedbg/dbg.y | 2 +- programs/winedbg/memory.c | 2 +- programs/winedbg/types.c | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/programs/winedbg/be_x86_64.c b/programs/winedbg/be_x86_64.c index dde30f36846..7fae50cd856 100644 --- a/programs/winedbg/be_x86_64.c +++ b/programs/winedbg/be_x86_64.c @@ -561,8 +561,7 @@ static unsigned be_x86_64_remove_Xpoint(HANDLE hProcess, const struct be_process if (size != 0) return 0; if (!pio->read(hProcess, addr, &ch, 1, &sz) || sz != 1) return 0; if (ch != (unsigned char)0xCC) - WINE_FIXME("Cannot get back %02x instead of 0xCC at %08lx\n", - ch, (unsigned long)addr); + WINE_FIXME("Cannot get back %02x instead of 0xCC at %p\n", ch, addr); ch = (unsigned char)val; if (!pio->write(hProcess, addr, &ch, 1, &sz) || sz != 1) return 0; break; diff --git a/programs/winedbg/dbg.y b/programs/winedbg/dbg.y index 5929b87cc3d..61acb909bfa 100644 --- a/programs/winedbg/dbg.y +++ b/programs/winedbg/dbg.y @@ -181,7 +181,7 @@ list_arg: | pathname ':' identifier { symbol_get_line($1, $3, &$$); } | '*' expr_lvalue { DWORD disp; ADDRESS64 addr; $$.SizeOfStruct = sizeof($$); types_extract_as_address(&$2, &addr); - SymGetLineFromAddr64(dbg_curr_process->handle, (unsigned long)memory_to_linear_addr(& addr), &disp, & $$); } + SymGetLineFromAddr64(dbg_curr_process->handle, (ULONG_PTR)memory_to_linear_addr(& addr), &disp, & $$); } ; run_command: diff --git a/programs/winedbg/memory.c b/programs/winedbg/memory.c index 735ef53e667..cfbf1612c5e 100644 --- a/programs/winedbg/memory.c +++ b/programs/winedbg/memory.c @@ -73,7 +73,7 @@ static void memory_report_invalid_addr(const void* addr) address.Mode = AddrModeFlat; address.Segment = 0; - address.Offset = (unsigned long)addr; + address.Offset = (ULONG_PTR)addr; dbg_printf("*** Invalid address "); print_address(&address, FALSE); dbg_printf(" ***\n"); diff --git a/programs/winedbg/types.c b/programs/winedbg/types.c index 9ac49f2f5ad..ef92e89bd4f 100644 --- a/programs/winedbg/types.c +++ b/programs/winedbg/types.c @@ -67,7 +67,7 @@ LONGLONG types_extract_as_longlong(const struct dbg_lvalue* lvalue, if (type.id == dbg_itype_segptr) { - return (long int)memory_to_linear_addr(&lvalue->addr); + return (LONG_PTR)memory_to_linear_addr(&lvalue->addr); } if (psize) *psize = 0;