From: Paul Eggert Date: Tue, 5 Apr 2011 20:08:03 +0000 (-0700) Subject: * sound.c (sound_warning): Don't crash if arg contains a printf format. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~394^2~9 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c136c10f5967fa2224d5d0d63681486161cc2aba;p=emacs.git * sound.c (sound_warning): Don't crash if arg contains a printf format. --- diff --git a/src/ChangeLog b/src/ChangeLog index 3f2837d52f0..c46f6f37cde 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -2,6 +2,8 @@ Fix more problems found by GCC 4.6.0's static checks. + * sound.c (sound_warning): Don't crash if arg contains a printf format. + * image.c (tiff_error_handler, tiff_warning_handler): Mark as printf-like functions. (tiff_load): Add casts to remove these marks before passing them diff --git a/src/sound.c b/src/sound.c index a2fe7ccc8ce..a972809e2c7 100644 --- a/src/sound.c +++ b/src/sound.c @@ -344,7 +344,7 @@ sound_perror (const char *msg) static void sound_warning (const char *msg) { - message (msg); + message ("%s", msg); }