]> git.eshelyaron.com Git - emacs.git/commitdiff
Work around GCC and GNOME bugs when --enable-gcc-warnings.
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 13 Sep 2012 01:22:08 +0000 (18:22 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 13 Sep 2012 01:22:08 +0000 (18:22 -0700)
* 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.

src/ChangeLog
src/emacsgtkfixed.c
src/image.c

index c0d3316bea15ecffa95522da569b68f98df765ad..29e8ea4232ebb1ef65e9cf81f93c62eb39c938b3 100644 (file)
@@ -1,3 +1,12 @@
+2012-09-13  Paul Eggert  <eggert@cs.ucla.edu>
+
+       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.
+
 2012-09-12  Paul Eggert  <eggert@cs.ucla.edu>
 
        More fixes for 'volatile' and setjmp/longjmp.
index 940482654b30b059a26f7462459386b28581d429..a21d0f8a4222edf3e9bc6d59b431aa5fd21c0d11 100644 (file)
@@ -27,6 +27,11 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "frame.h"
 #include "xterm.h"
 
+/* Silence a bogus diagnostic; see GNOME bug 683906.  */
+#include <verify.h>
+#undef G_STATIC_ASSERT
+#define G_STATIC_ASSERT(x) verify (x)
+
 #define EMACS_TYPE_FIXED emacs_fixed_get_type ()
 #define EMACS_FIXED(obj) \
   G_TYPE_CHECK_INSTANCE_CAST (obj, EMACS_TYPE_FIXED, EmacsFixed)
index cd5df99ef5728a48a915231051d95de0666c9f06..d4e54fb7dcdfafab5c8a0741537084b47bd77670 100644 (file)
@@ -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);