From: Joerg Sonnenberger Date: Sun, 26 Feb 2017 14:55:54 +0000 (+0100) Subject: Add format function annotation. X-Git-Tag: v3.3.2~78 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=06c2b6ccb0bbb7a2bbeb6233dcef530bd725bfeb;p=thirdparty%2Flibarchive.git Add format function annotation. --- diff --git a/tar/bsdtar.h b/tar/bsdtar.h index ee9c6485f..9c551fc6a 100644 --- a/tar/bsdtar.h +++ b/tar/bsdtar.h @@ -189,7 +189,7 @@ void do_chdir(struct bsdtar *); int edit_pathname(struct bsdtar *, struct archive_entry *); int need_report(void); int pathcmp(const char *a, const char *b); -void safe_fprintf(FILE *, const char *fmt, ...); +void safe_fprintf(FILE *, const char *fmt, ...) __LA_PRINTF(2, 3); void set_chdir(struct bsdtar *, const char *newdir); const char *tar_i64toa(int64_t); void tar_mode_c(struct bsdtar *bsdtar); @@ -198,7 +198,7 @@ void tar_mode_t(struct bsdtar *bsdtar); void tar_mode_u(struct bsdtar *bsdtar); void tar_mode_x(struct bsdtar *bsdtar); void usage(void); -int yes(const char *fmt, ...); +int yes(const char *fmt, ...) __LA_PRINTF(1, 2); #if defined(HAVE_REGEX_H) || defined(HAVE_PCREPOSIX_H) void add_substitution(struct bsdtar *, const char *);