diff options
| author | Paul Eggert | 2016-07-20 10:31:33 +0200 |
|---|---|---|
| committer | Paul Eggert | 2016-07-20 10:32:24 +0200 |
| commit | 3e71e4379ce7b53afe51ead4c94e6bb016bc6e7a (patch) | |
| tree | f1a28805fc683c4b9cf712c73283ec4115fcdd75 /src/image.c | |
| parent | 63750fd4ed4ff8bb9b3ff8868d4e36e3422adb21 (diff) | |
| download | emacs-3e71e4379ce7b53afe51ead4c94e6bb016bc6e7a.tar.gz emacs-3e71e4379ce7b53afe51ead4c94e6bb016bc6e7a.zip | |
Work around GCC bug 54561 in a better way
The new approach is less selective, but also less intrusive on C code.
* src/bytecode.c, src/image.c, src/keyboard.c: Ignore -Wclobbered.
* src/conf_post.h (NONVOLATILE): Remove. All uses removed.
Diffstat (limited to 'src/image.c')
| -rw-r--r-- | src/image.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/image.c b/src/image.c index 572557dd264..1770de7e8ff 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -56,6 +56,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 56 | #include TERM_HEADER | 56 | #include TERM_HEADER |
| 57 | #endif /* HAVE_WINDOW_SYSTEM */ | 57 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 58 | 58 | ||
| 59 | /* Work around GCC bug 54561. */ | ||
| 60 | #if GNUC_PREREQ (4, 3, 0) | ||
| 61 | # pragma GCC diagnostic ignored "-Wclobbered" | ||
| 62 | #endif | ||
| 63 | |||
| 59 | #ifdef HAVE_X_WINDOWS | 64 | #ifdef HAVE_X_WINDOWS |
| 60 | typedef struct x_bitmap_record Bitmap_Record; | 65 | typedef struct x_bitmap_record Bitmap_Record; |
| 61 | #define GET_PIXEL(ximg, x, y) XGetPixel (ximg, x, y) | 66 | #define GET_PIXEL(ximg, x, y) XGetPixel (ximg, x, y) |
| @@ -5897,9 +5902,8 @@ struct png_load_context | |||
| 5897 | static bool | 5902 | static bool |
| 5898 | png_load_body (struct frame *f, struct image *img, struct png_load_context *c) | 5903 | png_load_body (struct frame *f, struct image *img, struct png_load_context *c) |
| 5899 | { | 5904 | { |
| 5900 | Lisp_Object specified_file; | 5905 | Lisp_Object specified_file, specified_data; |
| 5901 | Lisp_Object NONVOLATILE specified_data; | 5906 | FILE *fp = NULL; |
| 5902 | FILE *NONVOLATILE fp = NULL; | ||
| 5903 | int x, y; | 5907 | int x, y; |
| 5904 | ptrdiff_t i; | 5908 | ptrdiff_t i; |
| 5905 | png_struct *png_ptr; | 5909 | png_struct *png_ptr; |
| @@ -6669,8 +6673,7 @@ static bool | |||
| 6669 | jpeg_load_body (struct frame *f, struct image *img, | 6673 | jpeg_load_body (struct frame *f, struct image *img, |
| 6670 | struct my_jpeg_error_mgr *mgr) | 6674 | struct my_jpeg_error_mgr *mgr) |
| 6671 | { | 6675 | { |
| 6672 | Lisp_Object specified_file; | 6676 | Lisp_Object specified_file, specified_data; |
| 6673 | Lisp_Object NONVOLATILE specified_data; | ||
| 6674 | FILE *volatile fp = NULL; | 6677 | FILE *volatile fp = NULL; |
| 6675 | JSAMPARRAY buffer; | 6678 | JSAMPARRAY buffer; |
| 6676 | int row_stride, x, y; | 6679 | int row_stride, x, y; |