error: add the printf attribute to a static function
authorJim Meyering <meyering@fb.com>
Sun, 20 Oct 2013 18:32:58 +0000 (11:32 -0700)
committerJim Meyering <meyering@fb.com>
Sun, 20 Oct 2013 18:32:58 +0000 (11:32 -0700)
* lib/error.c (error_tail): Add the printf attribute, to placate
gcc's -Werror=suggest-attribute=format option.

ChangeLog
lib/error.c

index 77a1d0d..1855d16 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-10-20  Jim Meyering  <meyering@fb.com>
+
+       error: add the printf attribute to a static function
+       * lib/error.c (error_tail): Add the printf attribute, to placate
+       gcc's -Werror=suggest-attribute=format option.
+
 2013-10-12  Jim Meyering  <meyering@fb.com>
 
        error: make the module depend on vfprintf-posix
index 865b293..cdc3026 100644 (file)
@@ -195,7 +195,7 @@ print_errno_message (int errnum)
 #endif
 }
 
-static void
+static void _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) _GL_ARG_NONNULL ((3))
 error_tail (int status, int errnum, const char *message, va_list args)
 {
 #if _LIBC