diff mbox

[RFC] api: init: add ODP_PRINTF_FORMAT to odp_log_func_t

Message ID 20170306103550.2126-1-dmitry.ereminsolenikov@linaro.org
State New
Headers show

Commit Message

Dmitry Eremin-Solenikov March 6, 2017, 10:35 a.m. UTC
Hint compiler that the odp_log_func_t (and as a result all of
ODP_ABORT/_LOG/_ERR/etc) expects a format and a set of arguments.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---

Currently this patch results in huuuge number of errors from all over the ODP
sources. I suggest considering fixing some these errors and then to merge this
patch.

 include/odp/api/spec/init.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.11.0
diff mbox

Patch

diff --git a/include/odp/api/spec/init.h b/include/odp/api/spec/init.h
index 154cdf8f..d6c30837 100644
--- a/include/odp/api/spec/init.h
+++ b/include/odp/api/spec/init.h
@@ -100,7 +100,7 @@  int odp_override_log(odp_log_level_t level, const char *fmt, ...);
 void odp_override_abort(void) ODP_NORETURN;
 
 /** Replaceable logging function */
-typedef int (*odp_log_func_t)(odp_log_level_t level, const char *fmt, ...);
+typedef int (*odp_log_func_t)(odp_log_level_t level, const char *fmt, ...) ODP_PRINTF_FORMAT(2, 3);
 
 /** Replaceable abort function */
 typedef void (*odp_abort_func_t)(void) ODP_NORETURN;