From: Ken Brown Date: Sat, 21 Jul 2018 16:15:22 +0000 (-0400) Subject: Pacify GCC 7 with -Wformat-overflow X-Git-Tag: emacs-27.0.90~4664^2~46 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f3f67cf0b9a6388d423e048a7aafad2eb531b5a5;p=emacs.git 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. --- 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; }