1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-20 11:33:09 -08:00

Work around GCC bug 81401

* src/xterm.c (x_draw_glyphless_glyph_string_foreground):
Make the buffer a byte longer than it needs to be, if
--enable-gcc-warnings.
This commit is contained in:
Paul Eggert 2018-05-30 12:59:59 -07:00
parent adc20d64eb
commit fb9c52bb7d

View file

@ -1973,7 +1973,13 @@ x_draw_glyphless_glyph_string_foreground (struct glyph_string *s)
for (i = 0; i < s->nchars; i++, glyph++)
{
char buf[7], *str = NULL;
#ifdef GCC_LINT
enum { PACIFY_GCC_BUG_81401 = 1 };
#else
enum { PACIFY_GCC_BUG_81401 = 0 };
#endif
char buf[7 + PACIFY_GCC_BUG_81401];
char *str = NULL;
int len = glyph->u.glyphless.len;
if (glyph->u.glyphless.method == GLYPHLESS_DISPLAY_ACRONYM)