summaryrefslogtreecommitdiffstats
path: root/lib/vty.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/vty.h')
-rw-r--r--lib/vty.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/vty.h b/lib/vty.h
index 31cbd498..65ae6201 100644
--- a/lib/vty.h
+++ b/lib/vty.h
@@ -141,6 +141,13 @@ struct vty
#define IS_DIRECTORY_SEP(c) ((c) == DIRECTORY_SEP)
#endif
+/* GCC have printf type attribute check. */
+#ifdef __GNUC__
+#define PRINTF_ATTRIBUTE(a,b) __attribute__ ((__format__ (__printf__, a, b)))
+#else
+#define PRINTF_ATTRIBUTE(a,b)
+#endif /* __GNUC__ */
+
/* Utility macros to convert VTY argument to unsigned long or integer. */
#define VTY_GET_LONG(NAME,V,STR) \
do { \