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
This commit is contained in:
nhmall
2026-04-09 10:28:52 -04:00
parent 4f5146306b
commit 8b2b749f6f

View File

@@ -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
*/