summaryrefslogtreecommitdiffstats
path: root/lib/log.h
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-08-09 00:15:23 +0200
committerPaul Jakma <paul@quagga.net>2009-06-18 21:18:24 +0200
commit80c375e72d7c3b9fe41b1ffec461ec5e1b57caa7 (patch)
tree1b596a2dd78fe20757443543512669c641b00ade /lib/log.h
parent[cleanup] Make command nodes static (diff)
downloadfrr-80c375e72d7c3b9fe41b1ffec461ec5e1b57caa7.tar.xz
frr-80c375e72d7c3b9fe41b1ffec461ec5e1b57caa7.zip
[gcc] Add gcc printf format checks
Diffstat (limited to 'lib/log.h')
-rw-r--r--lib/log.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/log.h b/lib/log.h
index 777fd77df..86097919a 100644
--- a/lib/log.h
+++ b/lib/log.h
@@ -111,7 +111,8 @@ extern void closezlog (struct zlog *zl);
#endif /* __GNUC__ */
/* Generic function for zlog. */
-extern void zlog (struct zlog *zl, int priority, const char *format, ...) PRINTF_ATTRIBUTE(3, 4);
+extern void zlog (struct zlog *zl, int priority, const char *format, ...)
+ PRINTF_ATTRIBUTE(3, 4);
/* Handy zlog functions. */
extern void zlog_err (const char *format, ...) PRINTF_ATTRIBUTE(1, 2);
@@ -121,11 +122,16 @@ extern void zlog_notice (const char *format, ...) PRINTF_ATTRIBUTE(1, 2);
extern void zlog_debug (const char *format, ...) PRINTF_ATTRIBUTE(1, 2);
/* For bgpd's peer oriented log. */
-extern void plog_err (struct zlog *, const char *format, ...);
-extern void plog_warn (struct zlog *, const char *format, ...);
-extern void plog_info (struct zlog *, const char *format, ...);
-extern void plog_notice (struct zlog *, const char *format, ...);
-extern void plog_debug (struct zlog *, const char *format, ...);
+extern void plog_err (struct zlog *, const char *format, ...)
+ PRINTF_ATTRIBUTE(2, 3);
+extern void plog_warn (struct zlog *, const char *format, ...)
+ PRINTF_ATTRIBUTE(2, 3);
+extern void plog_info (struct zlog *, const char *format, ...)
+ PRINTF_ATTRIBUTE(2, 3);
+extern void plog_notice (struct zlog *, const char *format, ...)
+ PRINTF_ATTRIBUTE(2, 3);
+extern void plog_debug (struct zlog *, const char *format, ...)
+ PRINTF_ATTRIBUTE(2, 3);
/* Set logging level for the given destination. If the log_level
argument is ZLOG_DISABLED, then the destination is disabled.