diff options
author | Allan McRae <allan@archlinux.org> | 2013-02-10 16:47:39 +1000 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2013-02-13 11:50:33 +1000 |
commit | 3fa2830829de2e3aa4bb916f164ae2fd75542ef3 (patch) | |
tree | f3bc49fdda7a506314e3fadac7bab37328e31dc8 /src/pacman/util.h | |
parent | 05b0d7e799416b48bb8b40ea199896e2b988698c (diff) | |
download | pacman-3fa2830829de2e3aa4bb916f164ae2fd75542ef3.tar.xz |
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 <allan@archlinux.org>
Diffstat (limited to 'src/pacman/util.h')
-rw-r--r-- | src/pacman/util.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pacman/util.h b/src/pacman/util.h index c38291a9..2d1e6989 100644 --- a/src/pacman/util.h +++ b/src/pacman/util.h @@ -72,11 +72,11 @@ void print_packages(const alpm_list_t *packages); void select_display(const alpm_list_t *pkglist); int select_question(int count); int multiselect_question(char *array, int count); -int yesno(char *fmt, ...); -int noyes(char *fmt, ...); +int yesno(char *fmt, ...) __attribute__((format(printf, 1, 2))); +int noyes(char *fmt, ...) __attribute__((format(printf, 1, 2))); int pm_printf(alpm_loglevel_t level, const char *format, ...) __attribute__((format(printf,2,3))); -int pm_asprintf(char **string, const char *format, ...); +int pm_asprintf(char **string, const char *format, ...) __attribute__((format(printf,2,3))); int pm_vfprintf(FILE *stream, alpm_loglevel_t level, const char *format, va_list args) __attribute__((format(printf,3,0))); int pm_vasprintf(char **string, alpm_loglevel_t level, const char *format, va_list args) __attribute__((format(printf,3,0))); |