Eric Pouech : winedbg: Don't use invalid address mode in exception prolog.
Module: wine Branch: master Commit: 41221452c875592c8eaf24be7ec722ebc22e5fd1 URL: https://gitlab.winehq.org/wine/wine/-/commit/41221452c875592c8eaf24be7ec722e... Author: Eric Pouech <eric.pouech(a)gmail.com> Date: Sun Nov 13 14:23:01 2022 +0100 winedbg: Don't use invalid address mode in exception prolog. Removes a GCC 12.2 warning about printing NULL string. Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com> --- programs/winedbg/tgt_active.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/programs/winedbg/tgt_active.c b/programs/winedbg/tgt_active.c index 943ac7a5891..9e130038f22 100644 --- a/programs/winedbg/tgt_active.c +++ b/programs/winedbg/tgt_active.c @@ -153,7 +153,7 @@ static BOOL dbg_exception_prolog(BOOL is_debug, const EXCEPTION_RECORD* rec) if (addr.Mode != dbg_curr_thread->addr_mode) { - const char* name = NULL; + const char* name; switch (addr.Mode) { @@ -162,6 +162,7 @@ static BOOL dbg_exception_prolog(BOOL is_debug, const EXCEPTION_RECORD* rec) case AddrModeReal: name = "vm86"; break; case AddrModeFlat: name = dbg_curr_process->be_cpu->pointer_size == 4 ? "32 bit" : "64 bit"; break; + default: return FALSE; } dbg_printf("In %s mode.\n", name); dbg_curr_thread->addr_mode = addr.Mode;
participants (1)
-
Alexandre Julliard