Add printf format checking attribute
[platform/upstream/connman.git] / include / log.h
index e9ee8e4..d154ba7 100644 (file)
@@ -32,9 +32,12 @@ extern "C" {
  * @short_description: Functions for logging error and debug information
  */
 
-extern void connman_info(const char *format, ...);
-extern void connman_error(const char *format, ...);
-extern void connman_debug(const char *format, ...);
+extern void connman_info(const char *format, ...)
+                               __attribute__((format(printf, 1, 2)));
+extern void connman_error(const char *format, ...)
+                               __attribute__((format(printf, 1, 2)));
+extern void connman_debug(const char *format, ...)
+                               __attribute__((format(printf, 1, 2)));
 
 /**
  * DBG: