Commit 6d9a89ea authored by Andi Kleen's avatar Andi Kleen Committed by Sam Ravnborg

kbuild: declare the modpost error functions as printf like

This way gcc can warn for wrong format strings
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
parent 6e588f6d
...@@ -33,7 +33,9 @@ enum export { ...@@ -33,7 +33,9 @@ enum export {
export_unused_gpl, export_gpl_future, export_unknown export_unused_gpl, export_gpl_future, export_unknown
}; };
void fatal(const char *fmt, ...) #define PRINTF __attribute__ ((format (printf, 1, 2)))
PRINTF void fatal(const char *fmt, ...)
{ {
va_list arglist; va_list arglist;
...@@ -46,7 +48,7 @@ void fatal(const char *fmt, ...) ...@@ -46,7 +48,7 @@ void fatal(const char *fmt, ...)
exit(1); exit(1);
} }
void warn(const char *fmt, ...) PRINTF void warn(const char *fmt, ...)
{ {
va_list arglist; va_list arglist;
...@@ -57,7 +59,7 @@ void warn(const char *fmt, ...) ...@@ -57,7 +59,7 @@ void warn(const char *fmt, ...)
va_end(arglist); va_end(arglist);
} }
void merror(const char *fmt, ...) PRINTF void merror(const char *fmt, ...)
{ {
va_list arglist; va_list arglist;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment