to check format even for variable arguments (...)
format (printf, string-index, first-to-check)
- string-index : format string index (starting from 1)
- first-to-check : first argument index to be checked
https://gcc.gnu.org/onlinedocs/gcc-4.0.1/gcc/Function-Attributes.html#Function-Attributes
Change-Id: I852fcea60109517e50e26e3ee1a8064fd9bb649f
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
}
* @endcode
*/
-int dlog_print(log_priority prio, const char *tag, const char *fmt, ...);
+
+#pragma GCC diagnostic warning "-Wformat"
+int dlog_print(log_priority prio, const char *tag, const char *fmt, ...) __attribute__((format(printf, 3, 4)));
/**