Annotate warnc/errc for format string checking.

This commit is contained in:
joerg 2014-01-07 02:09:37 +00:00
parent 4875b4da16
commit 8aff69ab6f
2 changed files with 4 additions and 3 deletions

View File

@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$");
const char *lafe_progname;
static void
static __printflike(2, 0) void
lafe_vwarnc(int code, const char *fmt, va_list ap)
{
fprintf(stderr, "%s: ", lafe_progname);

View File

@ -35,7 +35,8 @@
extern const char *lafe_progname;
void lafe_warnc(int code, const char *fmt, ...);
void lafe_errc(int eval, int code, const char *fmt, ...) __LA_DEAD;
void lafe_warnc(int code, const char *fmt, ...) __printflike(2, 3);
void lafe_errc(int eval, int code, const char *fmt, ...)
__LA_DEAD __printflike(3, 4);
#endif