From a4e7b0c88fe028e9bc431b3a35671773490b3a00 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Sat, 20 Jul 2002 03:55:06 +0000 Subject: [PATCH] Add __printflike() to printf() and sprintf() prototypes. -ffreestanding turns off gcc's builtin attributes for these functions and as a result -Wformat does no checking. (argh) --- lib/libstand/stand.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libstand/stand.h b/lib/libstand/stand.h index 470d60b0cb4..f3e0121cbd7 100644 --- a/lib/libstand/stand.h +++ b/lib/libstand/stand.h @@ -244,9 +244,9 @@ extern void free_region(void *start, void *end); struct disklabel; extern char *getdisklabel(const char *, struct disklabel *); -extern int printf(const char *fmt, ...); +extern int printf(const char *fmt, ...) __printflike(1, 2); extern void vprintf(const char *fmt, _BSD_VA_LIST_); -extern int sprintf(char *buf, const char *cfmt, ...); +extern int sprintf(char *buf, const char *cfmt, ...) __printflike(2, 3); extern void vsprintf(char *buf, const char *cfmt, _BSD_VA_LIST_); extern void twiddle(void);