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 --- src/pacman/callback.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/pacman/callback.h') diff --git a/src/pacman/callback.h b/src/pacman/callback.h index 4717360f..a291fc74 100644 --- a/src/pacman/callback.h +++ b/src/pacman/callback.h @@ -41,6 +41,7 @@ void cb_dl_total(off_t total); void cb_dl_progress(const char *filename, off_t file_xfered, off_t file_total); /* callback to handle messages/notifications from pacman library */ +__attribute__((format(printf, 2, 0))) void cb_log(alpm_loglevel_t level, const char *fmt, va_list args); #endif /* _PM_CALLBACK_H */ -- cgit v1.2.3-24-g4f1b