From 26187a38a17734d313c1294f47f95c4926d7b6ef Mon Sep 17 00:00:00 2001 From: Noam Postavsky <npostavs@gmail.com> Date: Fri, 10 Feb 2017 15:33:05 -0500 Subject: [PATCH] Fix warnings in debug tracing code * src/xdisp.c (dump_glyph, dump_glyph_string): * src/xfaces.c (dump_realized_face): Cast arguments or adjust format specifiers to match signedness. --- src/xdisp.c | 10 +++++----- src/xfaces.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index 6cb5b4e0562..e59934d2d5a 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -18972,7 +18972,7 @@ dump_glyph (struct glyph_row *row, struct glyph *glyph, int area) glyph->pixel_width, glyph->u.ch, (glyph->u.ch < 0x80 && glyph->u.ch >= ' ' - ? glyph->u.ch + ? (int) glyph->u.ch : '.'), glyph->face_id, glyph->left_box_line_p, @@ -18993,7 +18993,7 @@ dump_glyph (struct glyph_row *row, struct glyph *glyph, int area) ? '0' : '-'))), glyph->pixel_width, - 0, + 0u, ' ', glyph->face_id, glyph->left_box_line_p, @@ -19014,7 +19014,7 @@ dump_glyph (struct glyph_row *row, struct glyph *glyph, int area) ? '0' : '-'))), glyph->pixel_width, - glyph->u.img_id, + (unsigned int) glyph->u.img_id, '.', glyph->face_id, glyph->left_box_line_p, @@ -19035,7 +19035,7 @@ dump_glyph (struct glyph_row *row, struct glyph *glyph, int area) ? '0' : '-'))), glyph->pixel_width, - glyph->u.cmp.id); + (unsigned int) glyph->u.cmp.id); if (glyph->u.cmp.automatic) fprintf (stderr, "[%d-%d]", @@ -24616,7 +24616,7 @@ dump_glyph_string (struct glyph_string *s) fprintf (stderr, " x, y, w, h = %d, %d, %d, %d\n", s->x, s->y, s->width, s->height); fprintf (stderr, " ybase = %d\n", s->ybase); - fprintf (stderr, " hl = %d\n", s->hl); + fprintf (stderr, " hl = %u\n", s->hl); fprintf (stderr, " left overhang = %d, right = %d\n", s->left_overhang, s->right_overhang); fprintf (stderr, " nchars = %d\n", s->nchars); diff --git a/src/xfaces.c b/src/xfaces.c index 830106d64c0..b5dbb53ca20 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -6251,7 +6251,7 @@ dump_realized_face (struct face *face) fprintf (stderr, "underline: %d (%s)\n", face->underline_p, SDATA (Fsymbol_name (face->lface[LFACE_UNDERLINE_INDEX]))); - fprintf (stderr, "hash: %d\n", face->hash); + fprintf (stderr, "hash: %u\n", face->hash); } -- 2.39.5