From 3fa2830829de2e3aa4bb916f164ae2fd75542ef3 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Sun, 10 Feb 2013 16:47:39 +1000 Subject: Add format attributes to all required functions Fixes all clang warnings with -Wformat-literal. Also, fix genuine formating issue discovered once adding these attributes and add a cast to prevent a gcc warning. Signed-off-by: Allan McRae --- lib/libalpm/alpm.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/libalpm/alpm.h') diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 729a4c81..14443bb7 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -271,8 +271,9 @@ typedef enum _alpm_loglevel_t { } alpm_loglevel_t; typedef void (*alpm_cb_log)(alpm_loglevel_t, const char *, va_list); + int alpm_logaction(alpm_handle_t *handle, const char *prefix, - const char *fmt, ...); + const char *fmt, ...) __attribute__((format(printf, 3, 4))); /** * Events. -- cgit v1.2.3-24-g4f1b