From 890b93648b786133619f78971479daff0a89b74a Mon Sep 17 00:00:00 2001 From: bde Date: Sat, 27 Dec 2003 13:54:02 +0000 Subject: Use __printflike() and __dead2 instead of hard-coded gccisms. Declare perror(). We define and use a home made version of perror(3) that can't simply be removed (although it has the same interface as perror(3)) since it is very different (it prints on stdout, doesn't always print the program name, and sometimes exits). Declare it to get a reminder of this brokenness when WARNS is increased enough. --- sbin/fsck/fsutil.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sbin/fsck/fsutil.h b/sbin/fsck/fsutil.h index 1e6db99..84e7290 100644 --- a/sbin/fsck/fsutil.h +++ b/sbin/fsck/fsutil.h @@ -31,12 +31,10 @@ * $FreeBSD$ */ -void pfatal(const char *, ...) - __attribute__((__format__(__printf__,1,2))); -void pwarn(const char *, ...) - __attribute__((__format__(__printf__,1,2))); -void panic(const char *, ...) - __attribute__((__noreturn__,__format__(__printf__,1,2))); +void perror(const char *); +void pfatal(const char *, ...) __printflike(1, 2); +void pwarn(const char *, ...) __printflike(1, 2); +void panic(const char *, ...) __dead2 __printflike(1, 2); const char *devcheck(const char *); const char *cdevname(void); void setcdevname(const char *, int); -- cgit v1.1