diff options
| author | Paul Eggert | 2012-09-12 18:22:08 -0700 |
|---|---|---|
| committer | Paul Eggert | 2012-09-12 18:22:08 -0700 |
| commit | 5f0cb45a6f6af1dea4d41f5da86fc3e36828c6d0 (patch) | |
| tree | 565222c36e1b65bb7f389913a186fdddbf79cca1 | |
| parent | 40bce90baad677cd631c27819b32cca9c5d3a1ab (diff) | |
| download | emacs-5f0cb45a6f6af1dea4d41f5da86fc3e36828c6d0.tar.gz emacs-5f0cb45a6f6af1dea4d41f5da86fc3e36828c6d0.zip | |
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.
| -rw-r--r-- | src/ChangeLog | 9 | ||||
| -rw-r--r-- | src/emacsgtkfixed.c | 5 | ||||
| -rw-r--r-- | src/image.c | 8 |
3 files changed, 22 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index c0d3316bea1..29e8ea4232e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2012-09-13 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Work around GCC and GNOME bugs when --enable-gcc-warnings. | ||
| 4 | * emacsgtkfixed.c (G_STATIC_ASSERT): Redefine to use 'verify', | ||
| 5 | to work around GNOME bug 683906. | ||
| 6 | * image.c (jpeg_load_body) [HAVE_JPEG && lint]: Pacify gcc -Wclobber. | ||
| 7 | (struct my_jpeg_error_mgr) [HAVE_JPEG && lint]: New member fp. | ||
| 8 | This works around GCC bug 54561. | ||
| 9 | |||
| 1 | 2012-09-12 Paul Eggert <eggert@cs.ucla.edu> | 10 | 2012-09-12 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 11 | ||
| 3 | More fixes for 'volatile' and setjmp/longjmp. | 12 | More fixes for 'volatile' and setjmp/longjmp. |
diff --git a/src/emacsgtkfixed.c b/src/emacsgtkfixed.c index 940482654b3..a21d0f8a422 100644 --- a/src/emacsgtkfixed.c +++ b/src/emacsgtkfixed.c | |||
| @@ -27,6 +27,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 27 | #include "frame.h" | 27 | #include "frame.h" |
| 28 | #include "xterm.h" | 28 | #include "xterm.h" |
| 29 | 29 | ||
| 30 | /* Silence a bogus diagnostic; see GNOME bug 683906. */ | ||
| 31 | #include <verify.h> | ||
| 32 | #undef G_STATIC_ASSERT | ||
| 33 | #define G_STATIC_ASSERT(x) verify (x) | ||
| 34 | |||
| 30 | #define EMACS_TYPE_FIXED emacs_fixed_get_type () | 35 | #define EMACS_TYPE_FIXED emacs_fixed_get_type () |
| 31 | #define EMACS_FIXED(obj) \ | 36 | #define EMACS_FIXED(obj) \ |
| 32 | G_TYPE_CHECK_INSTANCE_CAST (obj, EMACS_TYPE_FIXED, EmacsFixed) | 37 | G_TYPE_CHECK_INSTANCE_CAST (obj, EMACS_TYPE_FIXED, EmacsFixed) |
diff --git a/src/image.c b/src/image.c index cd5df99ef57..d4e54fb7dcd 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -6140,6 +6140,9 @@ struct my_jpeg_error_mgr | |||
| 6140 | MY_JPEG_INVALID_IMAGE_SIZE, | 6140 | MY_JPEG_INVALID_IMAGE_SIZE, |
| 6141 | MY_JPEG_CANNOT_CREATE_X | 6141 | MY_JPEG_CANNOT_CREATE_X |
| 6142 | } failure_code; | 6142 | } failure_code; |
| 6143 | #ifdef lint | ||
| 6144 | FILE *fp; | ||
| 6145 | #endif | ||
| 6143 | }; | 6146 | }; |
| 6144 | 6147 | ||
| 6145 | 6148 | ||
| @@ -6392,6 +6395,8 @@ jpeg_load_body (struct frame *f, struct image *img, | |||
| 6392 | return 0; | 6395 | return 0; |
| 6393 | } | 6396 | } |
| 6394 | 6397 | ||
| 6398 | IF_LINT (mgr->fp = fp); | ||
| 6399 | |||
| 6395 | /* Customize libjpeg's error handling to call my_error_exit when an | 6400 | /* Customize libjpeg's error handling to call my_error_exit when an |
| 6396 | error is detected. This function will perform a longjmp. */ | 6401 | error is detected. This function will perform a longjmp. */ |
| 6397 | mgr->cinfo.err = fn_jpeg_std_error (&mgr->pub); | 6402 | mgr->cinfo.err = fn_jpeg_std_error (&mgr->pub); |
| @@ -6430,6 +6435,9 @@ jpeg_load_body (struct frame *f, struct image *img, | |||
| 6430 | return 0; | 6435 | return 0; |
| 6431 | } | 6436 | } |
| 6432 | 6437 | ||
| 6438 | /* Silence a bogus diagnostic; see GCC bug 54561. */ | ||
| 6439 | IF_LINT (fp = mgr->fp); | ||
| 6440 | |||
| 6433 | /* Create the JPEG decompression object. Let it read from fp. | 6441 | /* Create the JPEG decompression object. Let it read from fp. |
| 6434 | Read the JPEG image header. */ | 6442 | Read the JPEG image header. */ |
| 6435 | fn_jpeg_CreateDecompress (&mgr->cinfo, JPEG_LIB_VERSION, sizeof *&mgr->cinfo); | 6443 | fn_jpeg_CreateDecompress (&mgr->cinfo, JPEG_LIB_VERSION, sizeof *&mgr->cinfo); |