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);
      |                    ^~~
This commit is contained in:
nhmall
2025-11-22 10:34:45 -05:00
parent 93f8e5b3b3
commit 113607823d

View File

@@ -25,6 +25,7 @@
#include "wintty.h"
#endif
#include <inttypes.h>
#include <errno.h>
#ifdef WIN32
#include <VersionHelpers.h>
@@ -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)