Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6d9a89ea4b06146d29e1ffb4d6fded286fa07d29
Commit:     6d9a89ea4b06146d29e1ffb4d6fded286fa07d29
Parent:     6e588f6dcfcffa24decf418b96b4184a907d2bf8
Author:     Andi Kleen <[EMAIL PROTECTED]>
AuthorDate: Thu Nov 22 03:43:08 2007 +0100
Committer:  Sam Ravnborg <[EMAIL PROTECTED]>
CommitDate: Mon Jan 28 23:14:36 2008 +0100

    kbuild: declare the modpost error functions as printf like
    
    This way gcc can warn for wrong format strings
    Signed-off-by: Andi Kleen <[EMAIL PROTECTED]>
    Signed-off-by: Sam Ravnborg <[EMAIL PROTECTED]>
---
 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 93ac52a..3a12c22 100644
--- 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;
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to