From 113607823d587890995756e1aeae23aa8e80de1c Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 22 Nov 2025 10:34:45 -0500 Subject: [PATCH] Windows warning bit in windsys.c windows/windsys.c:263:15: warning: format string is not a string literal (potentially insecure) [-Wformat-security] 263 | msmsg(buf); | ^~~ ../sys/windows/windsys.c:263:15: note: treat the string as an argument to avoid this 263 | msmsg(buf); | ^ | "%s", ../sys/windows/windsys.c:267:20: warning: format string is not a string literal (potentially insecure) [-Wformat-security] 267 | raw_printf(buf); | ^~~ --- sys/windows/windsys.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/windows/windsys.c b/sys/windows/windsys.c index 3209d774f..d1327869f 100644 --- a/sys/windows/windsys.c +++ b/sys/windows/windsys.c @@ -25,6 +25,7 @@ #include "wintty.h" #endif #include +#include #ifdef WIN32 #include @@ -260,11 +261,11 @@ VA_DECL(const char *, s) buf[0] = '\n'; (void) vsnprintf(&buf[1], sizeof buf - (1 + sizeof "\n"), s, VA_ARGS); Strcat(buf, "\n"); - msmsg(buf); + msmsg("%s", buf); } else { (void) vsnprintf(buf, sizeof buf - sizeof "\n", s, VA_ARGS); Strcat(buf, "\n"); - raw_printf(buf); + raw_printf("%s",buf); } #ifdef MSWIN_GRAPHICS if (windowprocs.win_raw_print == mswin_raw_print)