From f3f67cf0b9a6388d423e048a7aafad2eb531b5a5 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Sat, 21 Jul 2018 12:15:22 -0400 Subject: [PATCH] Pacify GCC 7 with -Wformat-overflow * src/w32term.c (x_draw_glyphless_glyph_string_foreground): Force sprintf to write at most 6 bytes, excluding the terminating null byte. --- src/w32term.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/w32term.c b/src/w32term.c index ff0d2bf5ddb..0ae173a876b 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -1476,7 +1476,7 @@ x_draw_glyphless_glyph_string_foreground (struct glyph_string *s) { sprintf ((char *) buf, "%0*X", glyph->u.glyphless.ch < 0x10000 ? 4 : 6, - (unsigned int) glyph->u.glyphless.ch); + (unsigned int) glyph->u.glyphless.ch & 0xffffff); str = buf; } -- 2.39.2