aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-04-05 13:06:52 -0700
committerPaul Eggert2011-04-05 13:06:52 -0700
commit5e2d4a30b2a30631701f8645cf4f626c7c765569 (patch)
treebd228c85fef44cb4674ac86c0e3c9e35ae1fcc73 /src
parent583f48b90b03bcca4f561f1075aa674a04a7aa08 (diff)
downloademacs-5e2d4a30b2a30631701f8645cf4f626c7c765569.tar.gz
emacs-5e2d4a30b2a30631701f8645cf4f626c7c765569.zip
* image.c (tiff_error_handler, tiff_warning_handler): Mark as
printf-like functions. (tiff_load): Add casts to remove these marks before passing them to system-supplied API.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/image.c8
2 files changed, 11 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 45eee781589..3f2837d52f0 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -2,6 +2,11 @@
2 2
3 Fix more problems found by GCC 4.6.0's static checks. 3 Fix more problems found by GCC 4.6.0's static checks.
4 4
5 * image.c (tiff_error_handler, tiff_warning_handler): Mark as
6 printf-like functions.
7 (tiff_load): Add casts to remove these marks before passing them
8 to system-supplied API.
9
5 * eval.c (Fsignal): Remove excess argument to 'fatal'. 10 * eval.c (Fsignal): Remove excess argument to 'fatal'.
6 11
7 * coding.c (EMIT_ONE_BYTE, EMIT_TWO_BYTES): Use unsigned, not int. 12 * coding.c (EMIT_ONE_BYTE, EMIT_TWO_BYTES): Use unsigned, not int.
diff --git a/src/image.c b/src/image.c
index 45bd590e415..260bc6eb260 100644
--- a/src/image.c
+++ b/src/image.c
@@ -6714,6 +6714,8 @@ tiff_size_of_memory (thandle_t data)
6714} 6714}
6715 6715
6716 6716
6717static void tiff_error_handler (const char *, const char *, va_list)
6718 ATTRIBUTE_FORMAT_PRINTF (2, 0);
6717static void 6719static void
6718tiff_error_handler (const char *title, const char *format, va_list ap) 6720tiff_error_handler (const char *title, const char *format, va_list ap)
6719{ 6721{
@@ -6726,6 +6728,8 @@ tiff_error_handler (const char *title, const char *format, va_list ap)
6726} 6728}
6727 6729
6728 6730
6731static void tiff_warning_handler (const char *, const char *, va_list)
6732 ATTRIBUTE_FORMAT_PRINTF (2, 0);
6729static void 6733static void
6730tiff_warning_handler (const char *title, const char *format, va_list ap) 6734tiff_warning_handler (const char *title, const char *format, va_list ap)
6731{ 6735{
@@ -6757,8 +6761,8 @@ tiff_load (struct frame *f, struct image *img)
6757 specified_file = image_spec_value (img->spec, QCfile, NULL); 6761 specified_file = image_spec_value (img->spec, QCfile, NULL);
6758 specified_data = image_spec_value (img->spec, QCdata, NULL); 6762 specified_data = image_spec_value (img->spec, QCdata, NULL);
6759 6763
6760 fn_TIFFSetErrorHandler (tiff_error_handler); 6764 fn_TIFFSetErrorHandler ((TIFFErrorHandler) tiff_error_handler);
6761 fn_TIFFSetWarningHandler (tiff_warning_handler); 6765 fn_TIFFSetWarningHandler ((TIFFErrorHandler) tiff_warning_handler);
6762 6766
6763 if (NILP (specified_data)) 6767 if (NILP (specified_data))
6764 { 6768 {