]> git.eshelyaron.com Git - emacs.git/commitdiff
Port to GCC 4.9.0 with --enable-gcc-warnings.
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 22 Apr 2014 20:19:17 +0000 (13:19 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 22 Apr 2014 20:19:17 +0000 (13:19 -0700)
* image.c (struct my_jpeg_error_mgr) [lint]: Remove member fp.
All uses removed.
(jpeg_load_body) [lint]: Add a 'volatile' to pacify a buggy GCC in
a way that also works with GCC 4.9.0.

src/ChangeLog
src/image.c

index 2ac144f45a0790d7112654a207377978c9aa2eab..6e2f7057b755a0a4726cba1f5da10e6623bc35d1 100644 (file)
@@ -1,5 +1,11 @@
 2014-04-22  Paul Eggert  <eggert@cs.ucla.edu>
 
+       Port to GCC 4.9.0 with --enable-gcc-warnings.
+       * image.c (struct my_jpeg_error_mgr) [lint]: Remove member fp.
+       All uses removed.
+       (jpeg_load_body) [lint]: Add a 'volatile' to pacify a buggy GCC in
+       a way that also works with GCC 4.9.0.
+
        * search.c (Fnewline_cache_check): Remove unused locals.
 
 2014-04-22  Eli Zaretskii  <eliz@gnu.org>
index d6d5ace509ddb61cf0cec972d8bab216b6617db8..4133aaa7621b630d054a1e580afe1c66f89dfef0 100644 (file)
@@ -6262,9 +6262,6 @@ struct my_jpeg_error_mgr
       MY_JPEG_INVALID_IMAGE_SIZE,
       MY_JPEG_CANNOT_CREATE_X
     } failure_code;
-#ifdef lint
-  FILE *fp;
-#endif
 };
 
 
@@ -6479,7 +6476,8 @@ jpeg_load_body (struct frame *f, struct image *img,
 {
   Lisp_Object file, specified_file;
   Lisp_Object specified_data;
-  FILE *fp = NULL;
+  /* The 'volatile' silences a bogus diagnostic; see GCC bug 54561.  */
+  FILE * IF_LINT (volatile) fp = NULL;
   JSAMPARRAY buffer;
   int row_stride, x, y;
   XImagePtr ximg = NULL;
@@ -6512,8 +6510,6 @@ 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);
@@ -6552,9 +6548,6 @@ 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);