aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2016-01-22 15:27:55 -0800
committerPaul Eggert2016-01-22 15:28:34 -0800
commit27a0919cde7a6dce93aeba63b5ce7d0834f48531 (patch)
treef190ea19340c561cfd48c8cdc47831b9e9ad1956 /src
parentbbbb038654eab73624a5d51faa52f2d3f5db14b5 (diff)
downloademacs-27a0919cde7a6dce93aeba63b5ce7d0834f48531.tar.gz
emacs-27a0919cde7a6dce93aeba63b5ce7d0834f48531.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 157fa729fcf..5185e777324 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -18827,12 +18827,11 @@ dump_glyph (struct glyph_row *row, struct glyph *glyph, int area)
18827 } 18827 }
18828 else if (glyph->type == XWIDGET_GLYPH) 18828 else if (glyph->type == XWIDGET_GLYPH)
18829 { 18829 {
18830#ifndef HAVE_XWIDGETS
18831 eassume (false);
18832#else
18830 fprintf (stderr, 18833 fprintf (stderr,
18831#ifdef HAVE_XWIDGETS
18832 " %5d %4c %6d %c %3d 0x%05x %c %4d %1.1d%1.1d\n", 18834 " %5d %4c %6d %c %3d 0x%05x %c %4d %1.1d%1.1d\n",
18833#else
18834 " %5d %4c %6d %c %3d %c %4d %1.1d%1.1d\n",
18835#endif
18836 glyph - row->glyphs[TEXT_AREA], 18835 glyph - row->glyphs[TEXT_AREA],
18837 'X', 18836 'X',
18838 glyph->charpos, 18837 glyph->charpos,
@@ -18842,14 +18841,12 @@ dump_glyph (struct glyph_row *row, struct glyph *glyph, int area)
18842 ? 'S' 18841 ? 'S'
18843 : '-')), 18842 : '-')),
18844 glyph->pixel_width, 18843 glyph->pixel_width,
18845#ifdef HAVE_XWIDGETS
18846 glyph->u.xwidget, 18844 glyph->u.xwidget,
18847#endif
18848 '.', 18845 '.',
18849 glyph->face_id, 18846 glyph->face_id,
18850 glyph->left_box_line_p, 18847 glyph->left_box_line_p,
18851 glyph->right_box_line_p); 18848 glyph->right_box_line_p);
18852 18849#endif
18853 } 18850 }
18854} 18851}
18855 18852