diff options
| author | Paul Eggert | 2015-04-24 22:37:11 -0700 |
|---|---|---|
| committer | Paul Eggert | 2015-04-24 22:41:56 -0700 |
| commit | 52ba851db188de47b303120df00c77e3aad7e542 (patch) | |
| tree | fd7e6c3e4519b309b1b6c4d26c5d6465b0498fbf /src/print.c | |
| parent | 5933886920fefe800747baf7863685b9dc961d83 (diff) | |
| download | emacs-52ba851db188de47b303120df00c77e3aad7e542.tar.gz emacs-52ba851db188de47b303120df00c77e3aad7e542.zip | |
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).
Diffstat (limited to 'src/print.c')
| -rw-r--r-- | src/print.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/print.c b/src/print.c index bff5932c1d1..206466ce68f 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -794,9 +794,12 @@ safe_debug_print (Lisp_Object arg) | |||
| 794 | if (valid > 0) | 794 | if (valid > 0) |
| 795 | debug_print (arg); | 795 | debug_print (arg); |
| 796 | else | 796 | else |
| 797 | fprintf (stderr, "#<%s_LISP_OBJECT 0x%08"pI"x>\r\n", | 797 | { |
| 798 | !valid ? "INVALID" : "SOME", | 798 | EMACS_UINT n = XLI (arg); |
| 799 | XLI (arg)); | 799 | fprintf (stderr, "#<%s_LISP_OBJECT 0x%08"pI"x>\r\n", |
| 800 | !valid ? "INVALID" : "SOME", | ||
| 801 | n); | ||
| 802 | } | ||
| 800 | } | 803 | } |
| 801 | 804 | ||
| 802 | 805 | ||
| @@ -1422,7 +1425,7 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag) | |||
| 1422 | print single-byte non-ASCII string chars | 1425 | print single-byte non-ASCII string chars |
| 1423 | using octal escapes. */ | 1426 | using octal escapes. */ |
| 1424 | char outbuf[5]; | 1427 | char outbuf[5]; |
| 1425 | int len = sprintf (outbuf, "\\%03o", c); | 1428 | int len = sprintf (outbuf, "\\%03o", c + 0u); |
| 1426 | strout (outbuf, len, len, printcharfun); | 1429 | strout (outbuf, len, len, printcharfun); |
| 1427 | need_nonhex = false; | 1430 | need_nonhex = false; |
| 1428 | } | 1431 | } |
| @@ -1431,7 +1434,7 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag) | |||
| 1431 | { | 1434 | { |
| 1432 | /* When requested, print multibyte chars using hex escapes. */ | 1435 | /* When requested, print multibyte chars using hex escapes. */ |
| 1433 | char outbuf[sizeof "\\x" + INT_STRLEN_BOUND (c)]; | 1436 | char outbuf[sizeof "\\x" + INT_STRLEN_BOUND (c)]; |
| 1434 | int len = sprintf (outbuf, "\\x%04x", c); | 1437 | int len = sprintf (outbuf, "\\x%04x", c + 0u); |
| 1435 | strout (outbuf, len, len, printcharfun); | 1438 | strout (outbuf, len, len, printcharfun); |
| 1436 | need_nonhex = true; | 1439 | need_nonhex = true; |
| 1437 | } | 1440 | } |
| @@ -2094,11 +2097,11 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag) | |||
| 2094 | Probably should just emacs_abort (). */ | 2097 | Probably should just emacs_abort (). */ |
| 2095 | print_c_string ("#<EMACS BUG: INVALID DATATYPE ", printcharfun); | 2098 | print_c_string ("#<EMACS BUG: INVALID DATATYPE ", printcharfun); |
| 2096 | if (MISCP (obj)) | 2099 | if (MISCP (obj)) |
| 2097 | len = sprintf (buf, "(MISC 0x%04x)", (int) XMISCTYPE (obj)); | 2100 | len = sprintf (buf, "(MISC 0x%04x)", (unsigned) XMISCTYPE (obj)); |
| 2098 | else if (VECTORLIKEP (obj)) | 2101 | else if (VECTORLIKEP (obj)) |
| 2099 | len = sprintf (buf, "(PVEC 0x%08"pD"x)", ASIZE (obj)); | 2102 | len = sprintf (buf, "(PVEC 0x%08zx)", (size_t) ASIZE (obj)); |
| 2100 | else | 2103 | else |
| 2101 | len = sprintf (buf, "(0x%02x)", (int) XTYPE (obj)); | 2104 | len = sprintf (buf, "(0x%02x)", (unsigned) XTYPE (obj)); |
| 2102 | strout (buf, len, len, printcharfun); | 2105 | strout (buf, len, len, printcharfun); |
| 2103 | print_c_string ((" Save your buffers immediately" | 2106 | print_c_string ((" Save your buffers immediately" |
| 2104 | " and please report this bug>"), | 2107 | " and please report this bug>"), |