[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] xen/arm: check string format for early_printk



Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx>
---
 xen/include/asm-arm/early_printk.h |   14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/xen/include/asm-arm/early_printk.h 
b/xen/include/asm-arm/early_printk.h
index b72fce7..03ead23 100644
--- a/xen/include/asm-arm/early_printk.h
+++ b/xen/include/asm-arm/early_printk.h
@@ -14,13 +14,19 @@
 
 #ifdef EARLY_PRINTK
 
-void early_printk(const char *fmt, ...);
-void early_panic(const char *fmt, ...) __attribute__((noreturn));
+void early_printk(const char *fmt, ...)
+    __attribute__((format (printf, 1, 2)));
+void early_panic(const char *fmt, ...) __attribute__((noreturn))
+    __attribute__((format (printf, 1, 2)));
 
 #else
 
-static inline void early_printk(const char *fmt, ...) {}
-static inline void  __attribute__((noreturn)) early_panic(const char *fmt, 
...) {while(1);}
+static inline void early_printk(const char *fmt, ...)
+    __attribute__((format (printf, 1, 2)))
+{}
+static inline void  __attribute__((noreturn)) early_panic(const char *fmt, ...)
+    __attribute__((format (printf, 1, 2)))
+{while(1);}
 
 #endif
 
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.