summaryrefslogtreecommitdiff
path: root/src/image.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2015-04-24 22:37:11 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2015-04-24 22:41:56 -0700
commit52ba851db188de47b303120df00c77e3aad7e542 (patch)
treefd7e6c3e4519b309b1b6c4d26c5d6465b0498fbf /src/image.c
parent5933886920fefe800747baf7863685b9dc961d83 (diff)
downloademacs-52ba851db188de47b303120df00c77e3aad7e542.tar.gz
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/image.c')
-rw-r--r--src/image.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/image.c b/src/image.c
index df299bbd164..5e4843834c1 100644
--- a/src/image.c
+++ b/src/image.c
@@ -4964,7 +4964,8 @@ x_build_heuristic_mask (struct frame *f, struct image *img, Lisp_Object how)
if (i == 3 && NILP (how))
{
char color_name[30];
- sprintf (color_name, "#%04x%04x%04x", rgb[0], rgb[1], rgb[2]);
+ sprintf (color_name, "#%04x%04x%04x",
+ rgb[0] + 0u, rgb[1] + 0u, rgb[2] + 0u);
bg = (
#ifdef HAVE_NTGUI
0x00ffffff & /* Filter out palette info. */
@@ -5729,6 +5730,7 @@ png_load_body (struct frame *f, struct image *img, struct png_load_context *c)
/* Find out what file to load. */
specified_file = image_spec_value (img->spec, QCfile, NULL);
specified_data = image_spec_value (img->spec, QCdata, NULL);
+ IF_LINT (Lisp_Object volatile specified_data_volatile = specified_data);
if (NILP (specified_data))
{
@@ -5825,6 +5827,7 @@ png_load_body (struct frame *f, struct image *img, struct png_load_context *c)
/* Silence a bogus diagnostic; see GCC bug 54561. */
IF_LINT (fp = c->fp);
+ IF_LINT (specified_data = specified_data_volatile);
/* Read image info. */
if (!NILP (specified_data))
@@ -6467,6 +6470,7 @@ jpeg_load_body (struct frame *f, struct image *img,
/* Open the JPEG file. */
specified_file = image_spec_value (img->spec, QCfile, NULL);
specified_data = image_spec_value (img->spec, QCdata, NULL);
+ IF_LINT (Lisp_Object volatile specified_data_volatile = specified_data);
if (NILP (specified_data))
{
@@ -6528,6 +6532,9 @@ jpeg_load_body (struct frame *f, struct image *img,
return 0;
}
+ /* Silence a bogus diagnostic; see GCC bug 54561. */
+ IF_LINT (specified_data = specified_data_volatile);
+
/* Create the JPEG decompression object. Let it read from fp.
Read the JPEG image header. */
jpeg_CreateDecompress (&mgr->cinfo, JPEG_LIB_VERSION, sizeof *&mgr->cinfo);