diff options
| author | Andi Kleen <ak@suse.de> | 2007-11-21 21:43:08 -0500 |
|---|---|---|
| committer | Sam Ravnborg <sam@ravnborg.org> | 2008-01-28 17:14:36 -0500 |
| commit | 6d9a89ea4b06146d29e1ffb4d6fded286fa07d29 (patch) | |
| tree | 0772c9e1e718d3ad231c575c9245653ec8ee5d3d /scripts/mod | |
| parent | 6e588f6dcfcffa24decf418b96b4184a907d2bf8 (diff) | |
kbuild: declare the modpost error functions as printf like
This way gcc can warn for wrong format strings
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts/mod')
| -rw-r--r-- | scripts/mod/modpost.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 93ac52adb498..3a12c22cc2f8 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c | |||
| @@ -33,7 +33,9 @@ enum export { | |||
| 33 | export_unused_gpl, export_gpl_future, export_unknown | 33 | export_unused_gpl, export_gpl_future, export_unknown |
| 34 | }; | 34 | }; |
| 35 | 35 | ||
| 36 | void fatal(const char *fmt, ...) | 36 | #define PRINTF __attribute__ ((format (printf, 1, 2))) |
| 37 | |||
| 38 | PRINTF void fatal(const char *fmt, ...) | ||
| 37 | { | 39 | { |
| 38 | va_list arglist; | 40 | va_list arglist; |
| 39 | 41 | ||
| @@ -46,7 +48,7 @@ void fatal(const char *fmt, ...) | |||
| 46 | exit(1); | 48 | exit(1); |
| 47 | } | 49 | } |
| 48 | 50 | ||
| 49 | void warn(const char *fmt, ...) | 51 | PRINTF void warn(const char *fmt, ...) |
| 50 | { | 52 | { |
| 51 | va_list arglist; | 53 | va_list arglist; |
| 52 | 54 | ||
| @@ -57,7 +59,7 @@ void warn(const char *fmt, ...) | |||
| 57 | va_end(arglist); | 59 | va_end(arglist); |
| 58 | } | 60 | } |
| 59 | 61 | ||
| 60 | void merror(const char *fmt, ...) | 62 | PRINTF void merror(const char *fmt, ...) |
| 61 | { | 63 | { |
| 62 | va_list arglist; | 64 | va_list arglist; |
| 63 | 65 | ||
