1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-24 19:03:29 +00:00

Avoid compiler warnings in xdisp.c debugging code

* src/xdisp.c (dump_glyph, dump_glyph_row, Fdump_glyph_matrix):
Use pD directives for ptrdiff_t values instead of pI, to avoid
compilation warnings on 64-bit hosts.  (Bug#27597)
This commit is contained in:
Alexander Kuleshov 2017-07-08 11:15:52 +03:00 committed by Eli Zaretskii
parent 6e2a2b334d
commit 92307cb05d

View File

@ -19149,7 +19149,7 @@ dump_glyph (struct glyph_row *row, struct glyph *glyph, int area)
|| glyph->type == GLYPHLESS_GLYPH)
{
fprintf (stderr,
" %5"pD"d %c %9"pI"d %c %3d 0x%06x %c %4d %1.1d%1.1d\n",
" %5"pD"d %c %9"pD"d %c %3d 0x%06x %c %4d %1.1d%1.1d\n",
glyph - row->glyphs[TEXT_AREA],
(glyph->type == CHAR_GLYPH
? 'C'
@ -19174,7 +19174,7 @@ dump_glyph (struct glyph_row *row, struct glyph *glyph, int area)
else if (glyph->type == STRETCH_GLYPH)
{
fprintf (stderr,
" %5"pD"d %c %9"pI"d %c %3d 0x%06x %c %4d %1.1d%1.1d\n",
" %5"pD"d %c %9"pD"d %c %3d 0x%06x %c %4d %1.1d%1.1d\n",
glyph - row->glyphs[TEXT_AREA],
'S',
glyph->charpos,
@ -19195,7 +19195,7 @@ dump_glyph (struct glyph_row *row, struct glyph *glyph, int area)
else if (glyph->type == IMAGE_GLYPH)
{
fprintf (stderr,
" %5"pD"d %c %9"pI"d %c %3d 0x%06x %c %4d %1.1d%1.1d\n",
" %5"pD"d %c %9"pD"d %c %3d 0x%06x %c %4d %1.1d%1.1d\n",
glyph - row->glyphs[TEXT_AREA],
'I',
glyph->charpos,
@ -19216,7 +19216,7 @@ dump_glyph (struct glyph_row *row, struct glyph *glyph, int area)
else if (glyph->type == COMPOSITE_GLYPH)
{
fprintf (stderr,
" %5"pD"d %c %9"pI"d %c %3d 0x%06x",
" %5"pD"d %c %9"pD"d %c %3d 0x%06x",
glyph - row->glyphs[TEXT_AREA],
'+',
glyph->charpos,
@ -19277,7 +19277,7 @@ dump_glyph_row (struct glyph_row *row, int vpos, int glyphs)
fprintf (stderr, "Row Start End Used oE><\\CTZFesm X Y W H V A P\n");
fprintf (stderr, "==============================================================================\n");
fprintf (stderr, "%3d %9"pI"d %9"pI"d %4d %1.1d%1.1d%1.1d%1.1d\
fprintf (stderr, "%3d %9"pD"d %9"pD"d %4d %1.1d%1.1d%1.1d%1.1d\
%1.1d%1.1d%1.1d%1.1d%1.1d%1.1d%1.1d%1.1d %4d %4d %4d %4d %4d %4d %4d\n",
vpos,
MATRIX_ROW_START_CHARPOS (row),
@ -19306,7 +19306,7 @@ dump_glyph_row (struct glyph_row *row, int vpos, int glyphs)
fprintf (stderr, " %9"pD"d %9"pD"d\t%5d\n", row->start.overlay_string_index,
row->end.overlay_string_index,
row->continuation_lines_width);
fprintf (stderr, " %9"pI"d %9"pI"d\n",
fprintf (stderr, " %9"pD"d %9"pD"d\n",
CHARPOS (row->start.string_pos),
CHARPOS (row->end.string_pos));
fprintf (stderr, " %9d %9d\n", row->start.dpvec_index,
@ -19383,7 +19383,7 @@ with numeric argument, its value is passed as the GLYPHS flag. */)
struct window *w = XWINDOW (selected_window);
struct buffer *buffer = XBUFFER (w->contents);
fprintf (stderr, "PT = %"pI"d, BEGV = %"pI"d. ZV = %"pI"d\n",
fprintf (stderr, "PT = %"pD"d, BEGV = %"pD"d. ZV = %"pD"d\n",
BUF_PT (buffer), BUF_BEGV (buffer), BUF_ZV (buffer));
fprintf (stderr, "Cursor x = %d, y = %d, hpos = %d, vpos = %d\n",
w->cursor.x, w->cursor.y, w->cursor.hpos, w->cursor.vpos);