Mark functions handling format strings with __printflike

This commit is contained in:
Guillem Jover 2015-09-23 05:50:52 +02:00
parent 151bc71d64
commit ee26e59e72
2 changed files with 10 additions and 5 deletions

View File

@ -39,10 +39,14 @@
#include <stdarg.h>
__BEGIN_DECLS
extern void warnc (int code, const char *format, ...);
extern void vwarnc (int code, const char *format, va_list ap);
extern void errc (int status, int code, const char *format, ...);
extern void verrc (int status, int code, const char *format, va_list ap);
void warnc(int code, const char *format, ...)
__printflike(2, 3);
void vwarnc(int code, const char *format, va_list ap)
__printflike(2, 0);
void errc(int status, int code, const char *format, ...)
__printflike(3, 4);
void verrc(int status, int code, const char *format, va_list ap)
__printflike(3, 0);
__END_DECLS
#endif

View File

@ -60,7 +60,8 @@ void closefrom(int lowfd);
#define initsetproctitle(c, a, e) setproctitle_init((c), (a), (e))
void setproctitle_init(int argc, char *argv[], char *envp[]);
void setproctitle(const char *fmt, ...);
void setproctitle(const char *fmt, ...)
__printflike(1, 2);
int getpeereid(int s, uid_t *euid, gid_t *egid);
__END_DECLS