From: Alexander Kuleshov Date: Sat, 8 Jul 2017 08:15:52 +0000 (+0300) Subject: Avoid compiler warnings in xdisp.c debugging code X-Git-Tag: emacs-26.0.90~518^2~154 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=92307cb05d8b0d05dab7981f30c13962f8050eb0;p=emacs.git 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) --- diff --git a/src/xdisp.c b/src/xdisp.c index fad23bfdc9d..5df2dd18311 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -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);