From 32acb80174ec29f8adb5a6cb03c14be0b1c71fdc Mon Sep 17 00:00:00 2001 From: nhmall Date: Tue, 21 Apr 2026 05:13:46 -0400 Subject: [PATCH] resolve some valid warnings on Windows ../sys/windows/windmain.c:226:12: warning: address of array 'gc.chosen_windowtype' will always evaluate to 'true' [-Wpointer-bool-conversion] 226 | if (gc.chosen_windowtype && *gc.chosen_windowtype) ../sys/windows/consoletty.c:873:27: warning: address of array 'back->utf8str' will always evaluate to 'true' [-Wpointer-bool-conversion] 873 | if (back->utf8str && front->utf8str | ~~~~~~^~~~~~~ ~~ ../sys/windows/consoletty.c:873:45: warning: address of array 'front->utf8str' will always evaluate to 'true' [-Wpointer-bool-conversion] 873 | if (back->utf8str && front->utf8str | ~~ ~~~~~~~^~~~~~~ --- sys/windows/consoletty.c | 2 +- sys/windows/windmain.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/windows/consoletty.c b/sys/windows/consoletty.c index 988e7663a..c048a65b6 100644 --- a/sys/windows/consoletty.c +++ b/sys/windows/consoletty.c @@ -870,7 +870,7 @@ back_buffer_flip(void) do_anything |= do_wide_content; } else { #endif - if (back->utf8str && front->utf8str + if (back->utf8str[0] && front->utf8str[0] && strcmp((const char *) back->utf8str, (const char *) front->utf8str)) do_anything |= do_utf8_content; diff --git a/sys/windows/windmain.c b/sys/windows/windmain.c index 8d499cd5d..e15f9a882 100644 --- a/sys/windows/windmain.c +++ b/sys/windows/windmain.c @@ -223,7 +223,7 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/ #ifdef EARLY_CONFIGFILE_PASS rcfile_interface_options(); - if (gc.chosen_windowtype && *gc.chosen_windowtype) + if (*gc.chosen_windowtype) windowtype = gc.chosen_windowtype; #endif