aboutsummaryrefslogtreecommitdiffstats
path: root/src/image.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/image.c')
-rw-r--r--src/image.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/image.c b/src/image.c
index c1f25aa2357..0991f579579 100644
--- a/src/image.c
+++ b/src/image.c
@@ -5895,12 +5895,13 @@ static bool
5895png_load_body (struct frame *f, struct image *img, struct png_load_context *c) 5895png_load_body (struct frame *f, struct image *img, struct png_load_context *c)
5896{ 5896{
5897 Lisp_Object specified_file; 5897 Lisp_Object specified_file;
5898 Lisp_Object specified_data; 5898 /* IF_LINT (volatile) works around GCC bug 54561. */
5899 Lisp_Object IF_LINT (volatile) specified_data;
5900 FILE * IF_LINT (volatile) fp = NULL;
5899 int x, y; 5901 int x, y;
5900 ptrdiff_t i; 5902 ptrdiff_t i;
5901 png_struct *png_ptr; 5903 png_struct *png_ptr;
5902 png_info *info_ptr = NULL, *end_info = NULL; 5904 png_info *info_ptr = NULL, *end_info = NULL;
5903 FILE *fp = NULL;
5904 png_byte sig[8]; 5905 png_byte sig[8];
5905 png_byte *pixels = NULL; 5906 png_byte *pixels = NULL;
5906 png_byte **rows = NULL; 5907 png_byte **rows = NULL;
@@ -5922,7 +5923,6 @@ png_load_body (struct frame *f, struct image *img, struct png_load_context *c)
5922 /* Find out what file to load. */ 5923 /* Find out what file to load. */
5923 specified_file = image_spec_value (img->spec, QCfile, NULL); 5924 specified_file = image_spec_value (img->spec, QCfile, NULL);
5924 specified_data = image_spec_value (img->spec, QCdata, NULL); 5925 specified_data = image_spec_value (img->spec, QCdata, NULL);
5925 IF_LINT (Lisp_Object volatile specified_data_volatile = specified_data);
5926 5926
5927 if (NILP (specified_data)) 5927 if (NILP (specified_data))
5928 { 5928 {
@@ -6018,10 +6018,6 @@ png_load_body (struct frame *f, struct image *img, struct png_load_context *c)
6018 return 0; 6018 return 0;
6019 } 6019 }
6020 6020
6021 /* Silence a bogus diagnostic; see GCC bug 54561. */
6022 IF_LINT (fp = c->fp);
6023 IF_LINT (specified_data = specified_data_volatile);
6024
6025 /* Read image info. */ 6021 /* Read image info. */
6026 if (!NILP (specified_data)) 6022 if (!NILP (specified_data))
6027 png_set_read_fn (png_ptr, &tbr, png_read_from_memory); 6023 png_set_read_fn (png_ptr, &tbr, png_read_from_memory);
@@ -6672,9 +6668,9 @@ jpeg_load_body (struct frame *f, struct image *img,
6672 struct my_jpeg_error_mgr *mgr) 6668 struct my_jpeg_error_mgr *mgr)
6673{ 6669{
6674 Lisp_Object specified_file; 6670 Lisp_Object specified_file;
6675 Lisp_Object specified_data; 6671 /* IF_LINT (volatile) works around GCC bug 54561. */
6676 /* The 'volatile' silences a bogus diagnostic; see GCC bug 54561. */ 6672 Lisp_Object IF_LINT (volatile) specified_data;
6677 FILE * IF_LINT (volatile) fp = NULL; 6673 FILE *volatile fp = NULL;
6678 JSAMPARRAY buffer; 6674 JSAMPARRAY buffer;
6679 int row_stride, x, y; 6675 int row_stride, x, y;
6680 unsigned long *colors; 6676 unsigned long *colors;
@@ -6687,7 +6683,6 @@ jpeg_load_body (struct frame *f, struct image *img,
6687 /* Open the JPEG file. */ 6683 /* Open the JPEG file. */
6688 specified_file = image_spec_value (img->spec, QCfile, NULL); 6684 specified_file = image_spec_value (img->spec, QCfile, NULL);
6689 specified_data = image_spec_value (img->spec, QCdata, NULL); 6685 specified_data = image_spec_value (img->spec, QCdata, NULL);
6690 IF_LINT (Lisp_Object volatile specified_data_volatile = specified_data);
6691 6686
6692 if (NILP (specified_data)) 6687 if (NILP (specified_data))
6693 { 6688 {
@@ -6751,9 +6746,6 @@ jpeg_load_body (struct frame *f, struct image *img,
6751 return 0; 6746 return 0;
6752 } 6747 }
6753 6748
6754 /* Silence a bogus diagnostic; see GCC bug 54561. */
6755 IF_LINT (specified_data = specified_data_volatile);
6756
6757 /* Create the JPEG decompression object. Let it read from fp. 6749 /* Create the JPEG decompression object. Let it read from fp.
6758 Read the JPEG image header. */ 6750 Read the JPEG image header. */
6759 jpeg_CreateDecompress (&mgr->cinfo, JPEG_LIB_VERSION, sizeof *&mgr->cinfo); 6751 jpeg_CreateDecompress (&mgr->cinfo, JPEG_LIB_VERSION, sizeof *&mgr->cinfo);