From 52ba851db188de47b303120df00c77e3aad7e542 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 24 Apr 2015 22:37:11 -0700 Subject: Port --enable-gcc-warnings to GCC 5.1 x86-64 * lib-src/ebrowse.c (dump_sym): * lib-src/hexl.c (main): * src/ccl.c (ccl_driver): * src/character.c (string_escape_byte8): * src/dbusbind.c (xd_retrieve_arg, xd_add_watch): * src/gnutls.c (Fgnutls_boot): * src/gtkutil.c (xg_check_special_colors): * src/image.c (x_build_heuristic_mask): * src/print.c (safe_debug_print, print_object): * src/term.c (produce_glyphless_glyph): * src/xdisp.c (get_next_display_element) (produce_glyphless_glyph): * src/xterm.c (x_draw_glyphless_glyph_string_foreground): Don't use a signed format to print an unsigned integer, or vice versa. GCC 5.1's new -Wformat-signedness option warns about this. * src/image.c (png_load_body, jpeg_load_body): Silence a bogus setjump diagnostic from GCC 5.1 (GCC bug 54561). --- lib-src/ebrowse.c | 2 +- lib-src/hexl.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'lib-src') diff --git a/lib-src/ebrowse.c b/lib-src/ebrowse.c index d16c9ae54af..5c1e9d99bb8 100644 --- a/lib-src/ebrowse.c +++ b/lib-src/ebrowse.c @@ -1241,7 +1241,7 @@ dump_sym (FILE *fp, struct sym *root) putstr (NULL, fp); /* Print flags. */ - fprintf (fp, "%u", root->flags); + fprintf (fp, "%d", root->flags); putstr (root->filename, fp); putstr (root->regexp, fp); fprintf (fp, "%u", (unsigned) root->pos); diff --git a/lib-src/hexl.c b/lib-src/hexl.c index 490f72731b4..ac493c2740c 100644 --- a/lib-src/hexl.c +++ b/lib-src/hexl.c @@ -216,7 +216,7 @@ main (int argc, char **argv) else { if (!i) - printf ("%08lx: ", address); + printf ("%08lx: ", address + 0ul); if (iso_flag) string[i+1] = @@ -224,7 +224,7 @@ main (int argc, char **argv) else string[i+1] = (c < 0x20 || c >= 0x7F) ? '.' : c; - printf ("%02x", c); + printf ("%02x", c + 0u); } if ((i&group_by) == group_by) -- cgit v1.2.1