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.
This commit is contained in:
parent
894198ea56
commit
0675647a4e
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user