diff options
| author | Paul Eggert | 2018-05-30 12:59:59 -0700 |
|---|---|---|
| committer | Paul Eggert | 2018-05-30 13:00:31 -0700 |
| commit | fb9c52bb7d29c85f3baee770355260830dacea50 (patch) | |
| tree | 36855f0ef3dac9d7f3011e61398646894e1321aa /src/xterm.c | |
| parent | adc20d64eb551349f628040c7d04f0edf1c76493 (diff) | |
| download | emacs-fb9c52bb7d29c85f3baee770355260830dacea50.tar.gz emacs-fb9c52bb7d29c85f3baee770355260830dacea50.zip | |
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.
Diffstat (limited to 'src/xterm.c')
| -rw-r--r-- | src/xterm.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/xterm.c b/src/xterm.c index 4bdec7134f4..eb299c36759 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -1973,7 +1973,13 @@ x_draw_glyphless_glyph_string_foreground (struct glyph_string *s) | |||
| 1973 | 1973 | ||
| 1974 | for (i = 0; i < s->nchars; i++, glyph++) | 1974 | for (i = 0; i < s->nchars; i++, glyph++) |
| 1975 | { | 1975 | { |
| 1976 | char buf[7], *str = NULL; | 1976 | #ifdef GCC_LINT |
| 1977 | enum { PACIFY_GCC_BUG_81401 = 1 }; | ||
| 1978 | #else | ||
| 1979 | enum { PACIFY_GCC_BUG_81401 = 0 }; | ||
| 1980 | #endif | ||
| 1981 | char buf[7 + PACIFY_GCC_BUG_81401]; | ||
| 1982 | char *str = NULL; | ||
| 1977 | int len = glyph->u.glyphless.len; | 1983 | int len = glyph->u.glyphless.len; |
| 1978 | 1984 | ||
| 1979 | if (glyph->u.glyphless.method == GLYPHLESS_DISPLAY_ACRONYM) | 1985 | if (glyph->u.glyphless.method == GLYPHLESS_DISPLAY_ACRONYM) |