* sound.c (sound_warning): Don't crash if arg contains a printf format.
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 5 Apr 2011 20:08:03 +0000 (13:08 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 5 Apr 2011 20:08:03 +0000 (13:08 -0700)
src/ChangeLog
src/sound.c

index 3f2837d..c46f6f3 100644 (file)
@@ -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
index a2fe7cc..a972809 100644 (file)
@@ -344,7 +344,7 @@ sound_perror (const char *msg)
 static void
 sound_warning (const char *msg)
 {
-  message (msg);
+  message ("%s", msg);
 }