History

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>

Andi Kleen committed 18 years ago

Commit 6d9a89e1 parent 6e588f61 file · +5 −3Browse files

Unified · Split

scripts/mod/modpost.c+5−3
@@ -33,7 +33,9 @@ enum export { · 32 unmodified lines
33 export_unused_gpl, export_gpl_future, export_unknown33 export_unused_gpl, export_gpl_future, export_unknown
34};34};
35 35
36void fatal(const char *fmt, ...)36#define PRINTF __attribute__ ((format (printf, 1, 2)))
37
38PRINTF 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, ...) · 6 unmodified lines
46 exit(1);48 exit(1);
47}49}
48 50
49void warn(const char *fmt, ...)51PRINTF 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, ...) · 4 unmodified lines
57 va_end(arglist);59 va_end(arglist);
58}60}
59 61
60void merror(const char *fmt, ...)62PRINTF void merror(const char *fmt, ...)
61{63{
62 va_list arglist;64 va_list arglist;
63 65

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t