projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6e588f6
)
kbuild: declare the modpost error functions as printf like
author
Andi Kleen
<ak@suse.de>
Thu, 22 Nov 2007 02:43:08 +0000
(
03:43
+0100)
committer
Sam Ravnborg
<sam@ravnborg.org>
Mon, 28 Jan 2008 22:14:36 +0000
(23:14 +0100)
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>
scripts/mod/modpost.c
patch
|
blob
|
blame
|
history
diff --git
a/scripts/mod/modpost.c
b/scripts/mod/modpost.c
index 93ac52adb4980b3d23a0b40acd6800e48f75b349..3a12c22cc2f8f0ca82f624a50c4878fce389e7bb 100644
(file)
--- a/
scripts/mod/modpost.c
+++ b/
scripts/mod/modpost.c
@@
-33,7
+33,9
@@
enum export {
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;
@@
-46,7
+48,7
@@
void fatal(const char *fmt, ...)
exit(1);
}
-void warn(const char *fmt, ...)
+
PRINTF
void warn(const char *fmt, ...)
{
va_list arglist;
@@
-57,7
+59,7
@@
void warn(const char *fmt, ...)
va_end(arglist);
}
-void merror(const char *fmt, ...)
+
PRINTF
void merror(const char *fmt, ...)
{
va_list arglist;