Apply __attribute__((format(printf..))) Warning to Public dlog_print() 38/195438/2 submit/tizen/20181213.113859
authorHyotaek Shim <hyotaek.shim@samsung.com>
Thu, 13 Dec 2018 11:33:42 +0000 (20:33 +0900)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Thu, 13 Dec 2018 11:37:44 +0000 (20:37 +0900)
In public rootstrap, dlog-internal.h is removed.
So,
"#pragma GCC diagnostic warning "-Wformat"" will be applied instead of
"#pragma GCC diagnostic error "-Wformat""

Change-Id: I56beb06ac1cdb17fee45411e32f058f56b743bba
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
include/dlog.h

index 922c45f..b8f939d 100644 (file)
 #ifndef        _DLOG_H_
 #define        _DLOG_H_
 
-
 #include <stdarg.h>
 #include <string.h>
 #include <tizen_error.h>
+#pragma GCC diagnostic warning "-Wformat"
 #include "dlog-internal.h"
 
 #ifdef __cplusplus
@@ -134,7 +134,7 @@ int main(void)
 }
  * @endcode
  */
-int dlog_print(log_priority prio, const char *tag, const char *fmt, ...);
+int dlog_print(log_priority prio, const char *tag, const char *fmt, ...)  __attribute__((format(printf, 3, 4)));
 
 
 /**