* term.c (vfatal, maybe_fatal): Mark as printf-like functions.
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 5 Apr 2011 20:08:58 +0000 (13:08 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 5 Apr 2011 20:08:58 +0000 (13:08 -0700)
src/ChangeLog
src/term.c

index c46f6f3..6bb7a6f 100644 (file)
@@ -2,6 +2,8 @@
 
        Fix more problems found by GCC 4.6.0's static checks.
 
+       * term.c (vfatal, maybe_fatal): Mark as printf-like functions.
+
        * sound.c (sound_warning): Don't crash if arg contains a printf format.
 
        * image.c (tiff_error_handler, tiff_warning_handler): Mark as
index fc07c2b..d4e5faf 100644 (file)
@@ -85,8 +85,10 @@ static void set_tty_hooks (struct terminal *terminal);
 static void dissociate_if_controlling_tty (int fd);
 static void delete_tty (struct terminal *);
 static void maybe_fatal (int must_succeed, struct terminal *terminal,
-                        const char *str1, const char *str2, ...) NO_RETURN;
-static void vfatal (const char *str, va_list ap) NO_RETURN;
+                        const char *str1, const char *str2, ...)
+  NO_RETURN ATTRIBUTE_FORMAT_PRINTF (3, 5) ATTRIBUTE_FORMAT_PRINTF (4, 5);
+static void vfatal (const char *str, va_list ap)
+  NO_RETURN ATTRIBUTE_FORMAT_PRINTF (1, 0);
 
 
 #define OUTPUT(tty, a)                                          \