emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master fb9c52b: Work around GCC bug 81401


From: Paul Eggert
Subject: [Emacs-diffs] master fb9c52b: Work around GCC bug 81401
Date: Wed, 30 May 2018 16:00:35 -0400 (EDT)

branch: master
commit fb9c52bb7d29c85f3baee770355260830dacea50
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    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.
---
 src/xterm.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/xterm.c b/src/xterm.c
index 4bdec71..eb299c3 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]