[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-25 27a0919: Port recent xdisp.c fix to picky C compi
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] emacs-25 27a0919: Port recent xdisp.c fix to picky C compilers |
Date: |
Fri, 22 Jan 2016 23:28:38 +0000 |
branch: emacs-25
commit 27a0919cde7a6dce93aeba63b5ce7d0834f48531
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>
Port recent xdisp.c fix to picky C compilers
* src/xdisp.c (dump_glyph): Redo the call to fprintf to avoid
putting #if inside the arguments to a standard function, which
the C standard says has undefined behavior.
---
src/xdisp.c | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/src/xdisp.c b/src/xdisp.c
index 157fa72..5185e77 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -18827,12 +18827,11 @@ dump_glyph (struct glyph_row *row, struct glyph
*glyph, int area)
}
else if (glyph->type == XWIDGET_GLYPH)
{
+#ifndef HAVE_XWIDGETS
+ eassume (false);
+#else
fprintf (stderr,
-#ifdef HAVE_XWIDGETS
" %5d %4c %6d %c %3d 0x%05x %c %4d %1.1d%1.1d\n",
-#else
- " %5d %4c %6d %c %3d %c %4d %1.1d%1.1d\n",
-#endif
glyph - row->glyphs[TEXT_AREA],
'X',
glyph->charpos,
@@ -18842,14 +18841,12 @@ dump_glyph (struct glyph_row *row, struct glyph
*glyph, int area)
? 'S'
: '-')),
glyph->pixel_width,
-#ifdef HAVE_XWIDGETS
glyph->u.xwidget,
-#endif
'.',
glyph->face_id,
glyph->left_box_line_p,
glyph->right_box_line_p);
-
+#endif
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-25 27a0919: Port recent xdisp.c fix to picky C compilers,
Paul Eggert <=