diff --git a/bin/sh/error.h b/bin/sh/error.h index 68396e48bcbf..8fd9d88d9b1d 100644 --- a/bin/sh/error.h +++ b/bin/sh/error.h @@ -1,4 +1,4 @@ -/* $NetBSD: error.h,v 1.17 2008/03/29 09:58:00 apb Exp $ */ +/* $NetBSD: error.h,v 1.18 2011/08/23 09:59:20 christos Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -91,19 +91,29 @@ extern volatile int intpending; #if ! defined(SHELL_BUILTIN) void exraise(int) __attribute__((__noreturn__)); void onint(void); -void error(const char *, ...) __attribute__((__noreturn__)); -void exerror(int, const char *, ...) __attribute__((__noreturn__)); +void error(const char *, ...) __attribute__((__noreturn__)) + __attribute__((__format__(__printf__, 1, 2))); +void exerror(int, const char *, ...) __attribute__((__noreturn__)) + __attribute__((__format__(__printf__, 2, 3))); const char *errmsg(int, int); #endif /* ! SHELL_BUILTIN */ -void sh_err(int, const char *, ...) __attribute__((__noreturn__)); -void sh_verr(int, const char *, va_list) __attribute__((__noreturn__)); -void sh_errx(int, const char *, ...) __attribute__((__noreturn__)); -void sh_verrx(int, const char *, va_list) __attribute__((__noreturn__)); -void sh_warn(const char *, ...); -void sh_vwarn(const char *, va_list); -void sh_warnx(const char *, ...); -void sh_vwarnx(const char *, va_list); +void sh_err(int, const char *, ...) __attribute__((__noreturn__)) + __attribute__((__format__(__printf__, 2, 3))); +void sh_verr(int, const char *, va_list) __attribute__((__noreturn__)) + __attribute__((__format__(__printf__, 2, 0))); +void sh_errx(int, const char *, ...) __attribute__((__noreturn__)) + __attribute__((__format__(__printf__, 2, 3))); +void sh_verrx(int, const char *, va_list) __attribute__((__noreturn__)) + __attribute__((__format__(__printf__, 2, 0))); +void sh_warn(const char *, ...) + __attribute__((__format__(__printf__, 1, 2))); +void sh_vwarn(const char *, va_list) + __attribute__((__format__(__printf__, 1, 0))); +void sh_warnx(const char *, ...) + __attribute__((__format__(__printf__, 1, 2))); +void sh_vwarnx(const char *, va_list) + __attribute__((__format__(__printf__, 1, 0))); void sh_exit(int) __attribute__((__noreturn__)); diff --git a/bin/sh/output.h b/bin/sh/output.h index 76cb5308657d..c3707e2ae978 100644 --- a/bin/sh/output.h +++ b/bin/sh/output.h @@ -1,4 +1,4 @@ -/* $NetBSD: output.h,v 1.22 2010/10/29 17:06:53 stacktic Exp $ */ +/* $NetBSD: output.h,v 1.23 2011/08/23 09:59:20 christos Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -67,16 +67,17 @@ void flushall(void); void flushout(struct output *); void freestdout(void); void outfmt(struct output *, const char *, ...) - __attribute__((__format__(__printf__,2,3))); + __attribute__((__format__(__printf__, 2, 3))); void out1fmt(const char *, ...) - __attribute__((__format__(__printf__,1,2))); + __attribute__((__format__(__printf__, 1, 2))); #ifdef DEBUG void debugprintf(const char *, ...) - __attribute__((__format__(__printf__,1,2))); + __attribute__((__format__(__printf__, 1, 2))); #endif void fmtstr(char *, size_t, const char *, ...) - __attribute__((__format__(__printf__,3,4))); -void doformat(struct output *, const char *, va_list); + __attribute__((__format__(__printf__, 3, 4))); +void doformat(struct output *, const char *, va_list) + __attribute__((__format__(__printf__, 2, 0))); int xwrite(int, char *, int); int xioctl(int, unsigned long, char *);