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: I70ee2d0687c87b4f15f46dd962c249136d27709f
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
__dlog_print(LOG_ID_MAIN, DLOG_INFO, USR_TAG, "you must not use this API directly");
* @endcode
*/
-int __dlog_print(log_id_t log_id, int prio, const char *tag, const char *fmt, ...);
+#pragma GCC diagnostic error "-Wformat"
+int __dlog_print(log_id_t log_id, int prio, const char *tag, const char *fmt, ...) __attribute__((format(printf, 4, 5)));
/**
* @internal