diff options
| author | Paul Eggert | 2016-05-30 16:09:25 -0700 |
|---|---|---|
| committer | Paul Eggert | 2016-05-30 16:13:04 -0700 |
| commit | 237244bbd5ce753bcdf79634561de515bd76c687 (patch) | |
| tree | fa395a0e84b27c4755d3fc3ff0f06b1bfdd2b693 /src/image.c | |
| parent | cb379cbb7fc617f897e7dbc3ce45bf99ea3d1f87 (diff) | |
| download | emacs-237244bbd5ce753bcdf79634561de515bd76c687.tar.gz emacs-237244bbd5ce753bcdf79634561de515bd76c687.zip | |
Omit IF_LINT code that no longer seems needed
Nowadays GCC is smarter, or the Emacs code has mutated, or both,
and now is as good a time as any to remove uses of IF_LINT that
now seem to be unnecessary.
* lib-src/emacsclient.c (set_local_socket):
* lib-src/movemail.c (main) [MAIL_USE_MAILLOCK && HAVE_TOUCHLOCK]:
* src/buffer.c (fix_start_end_in_overlays, fix_overlays_before):
* src/casefiddle.c (casify_region):
* src/charset.c (load_charset_map):
* src/coding.c (decode_coding_object, encode_coding_object):
* src/data.c (Fmake_variable_buffer_local, Fmake_local_variable)
(cons_to_unsigned, cons_to_signed):
* src/frame.c (make_frame, x_set_frame_parameters):
* src/keyboard.c (read_event_from_main_queue):
* src/regex.c (regex_compile):
* src/syntax.c (back_comment):
* src/window.c (Frecenter):
* src/xfaces.c (Fx_list_fonts):
Remove IF_LINT that no longer seems necessary.
* src/image.c (png_load_body, jpeg_load_body): Simplify use of IF_LINT.
* src/keyboard.c (read_char): Use IF_LINT (volatile) rather than
a pragma dance to pacify GCC -Wclobbered.
* src/xdisp.c (x_produce_glyphs): Rewrite to avoid need for IF_LINT.
* src/xterm.c (x_connection_closed): Now _Noreturn, which should
mean we do not need IF_LINT any more.
(x_io_error_quitter): Now _Noreturn. Put an 'assume (false)’
at the end, to forestall warnings from older compilers.
Diffstat (limited to 'src/image.c')
| -rw-r--r-- | src/image.c | 20 |
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 | |||
| 5895 | png_load_body (struct frame *f, struct image *img, struct png_load_context *c) | 5895 | png_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); |