diff options
| author | Paul Eggert | 2014-04-22 13:19:17 -0700 |
|---|---|---|
| committer | Paul Eggert | 2014-04-22 13:19:17 -0700 |
| commit | 34e856d5ac828753b7be20e2471f39fb613f7f40 (patch) | |
| tree | acff3e9997aa61a054c61089bcd27c833c781b66 /src | |
| parent | 0fae5004bc971311f4abaa6acb073c4551eda7d5 (diff) | |
| download | emacs-34e856d5ac828753b7be20e2471f39fb613f7f40.tar.gz emacs-34e856d5ac828753b7be20e2471f39fb613f7f40.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/image.c | 11 |
2 files changed, 8 insertions, 9 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 2ac144f45a0..6e2f7057b75 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,11 @@ | |||
| 1 | 2014-04-22 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2014-04-22 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | Port to GCC 4.9.0 with --enable-gcc-warnings. | ||
| 4 | * image.c (struct my_jpeg_error_mgr) [lint]: Remove member fp. | ||
| 5 | All uses removed. | ||
| 6 | (jpeg_load_body) [lint]: Add a 'volatile' to pacify a buggy GCC in | ||
| 7 | a way that also works with GCC 4.9.0. | ||
| 8 | |||
| 3 | * search.c (Fnewline_cache_check): Remove unused locals. | 9 | * search.c (Fnewline_cache_check): Remove unused locals. |
| 4 | 10 | ||
| 5 | 2014-04-22 Eli Zaretskii <eliz@gnu.org> | 11 | 2014-04-22 Eli Zaretskii <eliz@gnu.org> |
diff --git a/src/image.c b/src/image.c index d6d5ace509d..4133aaa7621 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -6262,9 +6262,6 @@ struct my_jpeg_error_mgr | |||
| 6262 | MY_JPEG_INVALID_IMAGE_SIZE, | 6262 | MY_JPEG_INVALID_IMAGE_SIZE, |
| 6263 | MY_JPEG_CANNOT_CREATE_X | 6263 | MY_JPEG_CANNOT_CREATE_X |
| 6264 | } failure_code; | 6264 | } failure_code; |
| 6265 | #ifdef lint | ||
| 6266 | FILE *fp; | ||
| 6267 | #endif | ||
| 6268 | }; | 6265 | }; |
| 6269 | 6266 | ||
| 6270 | 6267 | ||
| @@ -6479,7 +6476,8 @@ jpeg_load_body (struct frame *f, struct image *img, | |||
| 6479 | { | 6476 | { |
| 6480 | Lisp_Object file, specified_file; | 6477 | Lisp_Object file, specified_file; |
| 6481 | Lisp_Object specified_data; | 6478 | Lisp_Object specified_data; |
| 6482 | FILE *fp = NULL; | 6479 | /* The 'volatile' silences a bogus diagnostic; see GCC bug 54561. */ |
| 6480 | FILE * IF_LINT (volatile) fp = NULL; | ||
| 6483 | JSAMPARRAY buffer; | 6481 | JSAMPARRAY buffer; |
| 6484 | int row_stride, x, y; | 6482 | int row_stride, x, y; |
| 6485 | XImagePtr ximg = NULL; | 6483 | XImagePtr ximg = NULL; |
| @@ -6512,8 +6510,6 @@ jpeg_load_body (struct frame *f, struct image *img, | |||
| 6512 | return 0; | 6510 | return 0; |
| 6513 | } | 6511 | } |
| 6514 | 6512 | ||
| 6515 | IF_LINT (mgr->fp = fp); | ||
| 6516 | |||
| 6517 | /* Customize libjpeg's error handling to call my_error_exit when an | 6513 | /* Customize libjpeg's error handling to call my_error_exit when an |
| 6518 | error is detected. This function will perform a longjmp. */ | 6514 | error is detected. This function will perform a longjmp. */ |
| 6519 | mgr->cinfo.err = fn_jpeg_std_error (&mgr->pub); | 6515 | mgr->cinfo.err = fn_jpeg_std_error (&mgr->pub); |
| @@ -6552,9 +6548,6 @@ jpeg_load_body (struct frame *f, struct image *img, | |||
| 6552 | return 0; | 6548 | return 0; |
| 6553 | } | 6549 | } |
| 6554 | 6550 | ||
| 6555 | /* Silence a bogus diagnostic; see GCC bug 54561. */ | ||
| 6556 | IF_LINT (fp = mgr->fp); | ||
| 6557 | |||
| 6558 | /* Create the JPEG decompression object. Let it read from fp. | 6551 | /* Create the JPEG decompression object. Let it read from fp. |
| 6559 | Read the JPEG image header. */ | 6552 | Read the JPEG image header. */ |
| 6560 | fn_jpeg_CreateDecompress (&mgr->cinfo, JPEG_LIB_VERSION, sizeof *&mgr->cinfo); | 6553 | fn_jpeg_CreateDecompress (&mgr->cinfo, JPEG_LIB_VERSION, sizeof *&mgr->cinfo); |