summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-01-20 12:28:04 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-01-20 12:28:20 -0800
commitee548dde0f5bcc6503ad2f74af5261fbf022dada (patch)
tree03961bf0d53d1240e7f08a3f100a2f62bc8d16ba
parent77b03188b14cdef4523184a73b25fb2703d52685 (diff)
Mark fatal() and warning() as taking printf-style arguments
Silences -Wformat-nonliteral warnings about them passing through unknown format arguments to vfprintf. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--xrandr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xrandr.c b/xrandr.c
index e8d24fb..fe2e5c5 100644
--- a/xrandr.c
+++ b/xrandr.c
@@ -156,7 +156,7 @@ usage(void)
/*NOTREACHED*/
}
-static void _X_NORETURN
+static void _X_NORETURN _X_ATTRIBUTE_PRINTF(1,2)
fatal (const char *format, ...)
{
va_list ap;
@@ -169,7 +169,7 @@ fatal (const char *format, ...)
/*NOTREACHED*/
}
-static void
+static void _X_ATTRIBUTE_PRINTF(1,2)
warning (const char *format, ...)
{
va_list ap;