summaryrefslogtreecommitdiff
path: root/src/image.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2012-09-12 18:22:08 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2012-09-12 18:22:08 -0700
commit5f0cb45a6f6af1dea4d41f5da86fc3e36828c6d0 (patch)
tree565222c36e1b65bb7f389913a186fdddbf79cca1 /src/image.c
parent40bce90baad677cd631c27819b32cca9c5d3a1ab (diff)
downloademacs-5f0cb45a6f6af1dea4d41f5da86fc3e36828c6d0.tar.gz
Work around GCC and GNOME bugs when --enable-gcc-warnings.
* emacsgtkfixed.c (G_STATIC_ASSERT): Redefine to use 'verify', to work around GNOME bug 683906. * image.c (jpeg_load_body) [HAVE_JPEG && lint]: Pacify gcc -Wclobber. (struct my_jpeg_error_mgr) [HAVE_JPEG && lint]: New member fp. This works around GCC bug 54561.
Diffstat (limited to 'src/image.c')
-rw-r--r--src/image.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/image.c b/src/image.c
index cd5df99ef57..d4e54fb7dcd 100644
--- a/src/image.c
+++ b/src/image.c
@@ -6140,6 +6140,9 @@ struct my_jpeg_error_mgr
MY_JPEG_INVALID_IMAGE_SIZE,
MY_JPEG_CANNOT_CREATE_X
} failure_code;
+#ifdef lint
+ FILE *fp;
+#endif
};
@@ -6392,6 +6395,8 @@ jpeg_load_body (struct frame *f, struct image *img,
return 0;
}
+ IF_LINT (mgr->fp = fp);
+
/* Customize libjpeg's error handling to call my_error_exit when an
error is detected. This function will perform a longjmp. */
mgr->cinfo.err = fn_jpeg_std_error (&mgr->pub);
@@ -6430,6 +6435,9 @@ jpeg_load_body (struct frame *f, struct image *img,
return 0;
}
+ /* Silence a bogus diagnostic; see GCC bug 54561. */
+ IF_LINT (fp = mgr->fp);
+
/* Create the JPEG decompression object. Let it read from fp.
Read the JPEG image header. */
fn_jpeg_CreateDecompress (&mgr->cinfo, JPEG_LIB_VERSION, sizeof *&mgr->cinfo);