From 8b2b749f6fefc3c59d6d6163f56cd571f021b77a Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 9 Apr 2026 10:28:52 -0400 Subject: [PATCH] quiet a warning observed when compiling consoletty The warning was observed during CI build: [warning]NetHack\sys\windows\consoletty.c(2573,29): Warning C4127: conditional expression is constant --- sys/windows/consoletty.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/windows/consoletty.c b/sys/windows/consoletty.c index 7831d89e0..bb67541a7 100644 --- a/sys/windows/consoletty.c +++ b/sys/windows/consoletty.c @@ -2541,6 +2541,9 @@ void early_raw_print(const char *s) * */ + +DISABLE_WARNING_CONDEXPR_IS_CONSTANT + void nethack_enter_consoletty(void) { int width; @@ -2776,6 +2779,8 @@ void nethack_enter_consoletty(void) } #endif /* TTY_GRAPHICS */ +RESTORE_WARNING_CONDEXPR_IS_CONSTANT + /* this is used as a printf() replacement when the window * system isn't initialized yet */