From: Guillem Jover Date: Wed, 23 Sep 2015 03:50:52 +0000 (+0200) Subject: Mark functions handling format strings with __printflike X-Git-Tag: 0.8.0~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee26e59e727c51fcf4e01d4d4cab3b697bb6b31d;p=thirdparty%2Flibbsd.git Mark functions handling format strings with __printflike --- diff --git a/include/bsd/err.h b/include/bsd/err.h index fcaaa85..b465c1b 100644 --- a/include/bsd/err.h +++ b/include/bsd/err.h @@ -39,10 +39,14 @@ #include __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 diff --git a/include/bsd/unistd.h b/include/bsd/unistd.h index 5dfa605..78a4525 100644 --- a/include/bsd/unistd.h +++ b/include/bsd/unistd.h @@ -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