From 58f09d9b897a519f2d022886b1825af125c34432 Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Sun, 30 Mar 1997 08:57:35 +0000 Subject: [PATCH] more __attribute__'s git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1506 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/roken/err.h | 20 ++++++++++++-------- lib/roken/err.hin | 20 ++++++++++++-------- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/lib/roken/err.h b/lib/roken/err.h index b5e3fa8de..bb7057910 100644 --- a/lib/roken/err.h +++ b/lib/roken/err.h @@ -13,13 +13,17 @@ extern char *__progname; void warnerr(int doexit, int eval, int doerrno, const char *fmt, va_list ap); -void verr(int eval, const char *fmt, va_list ap); -void err(int eval, const char *fmt, ...); -void verrx(int eval, const char *fmt, va_list ap); -void errx(int eval, const char *fmt, ...); -void vwarn(const char *fmt, va_list ap); -void warn(const char *fmt, ...); -void vwarnx(const char *fmt, va_list ap); -void warnx(const char *fmt, ...); +#ifndef __GNUC__ +#define __attribute__(x) +#endif + +void verr(int eval, const char *fmt, va_list ap) __attribute__ ((noreturn, format (printf, 2, 0))); +void err(int eval, const char *fmt, ...) __attribute__ ((noreturn, format (printf, 2, 3))); +void verrx(int eval, const char *fmt, va_list ap) __attribute__ ((noreturn, format (printf, 2, 0))); +void errx(int eval, const char *fmt, ...) __attribute__ ((noreturn, format (printf, 2, 3))); +void vwarn(const char *fmt, va_list ap) __attribute__ ((format (printf, 1, 0))); +void warn(const char *fmt, ...) __attribute__ ((format (printf, 1, 2))); +void vwarnx(const char *fmt, va_list ap) __attribute__ ((format (printf, 1, 0))); +void warnx(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));; #endif /* __ERR_H__ */ diff --git a/lib/roken/err.hin b/lib/roken/err.hin index b5e3fa8de..bb7057910 100644 --- a/lib/roken/err.hin +++ b/lib/roken/err.hin @@ -13,13 +13,17 @@ extern char *__progname; void warnerr(int doexit, int eval, int doerrno, const char *fmt, va_list ap); -void verr(int eval, const char *fmt, va_list ap); -void err(int eval, const char *fmt, ...); -void verrx(int eval, const char *fmt, va_list ap); -void errx(int eval, const char *fmt, ...); -void vwarn(const char *fmt, va_list ap); -void warn(const char *fmt, ...); -void vwarnx(const char *fmt, va_list ap); -void warnx(const char *fmt, ...); +#ifndef __GNUC__ +#define __attribute__(x) +#endif + +void verr(int eval, const char *fmt, va_list ap) __attribute__ ((noreturn, format (printf, 2, 0))); +void err(int eval, const char *fmt, ...) __attribute__ ((noreturn, format (printf, 2, 3))); +void verrx(int eval, const char *fmt, va_list ap) __attribute__ ((noreturn, format (printf, 2, 0))); +void errx(int eval, const char *fmt, ...) __attribute__ ((noreturn, format (printf, 2, 3))); +void vwarn(const char *fmt, va_list ap) __attribute__ ((format (printf, 1, 0))); +void warn(const char *fmt, ...) __attribute__ ((format (printf, 1, 2))); +void vwarnx(const char *fmt, va_list ap) __attribute__ ((format (printf, 1, 0))); +void warnx(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));; #endif /* __ERR_H__ */