diff options
author | Julien Grall <julien.grall@linaro.org> | 2013-05-23 16:05:18 +0100 |
---|---|---|
committer | Ian Campbell <ian.campbell@citrix.com> | 2013-05-30 09:15:25 +0100 |
commit | 54353cae096c19f176417f6d425de0a0f8a71228 (patch) | |
tree | f6aa55fa6213b3efdfe7cfe7feb7676b644035f5 | |
parent | cafdceb66e154f1ac204be935f9030959827bd1f (diff) | |
download | xen-54353cae096c19f176417f6d425de0a0f8a71228.tar.gz xen-54353cae096c19f176417f6d425de0a0f8a71228.tar.bz2 xen-54353cae096c19f176417f6d425de0a0f8a71228.zip |
xen/arm: check string format for early_printk
Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
-rw-r--r-- | xen/include/asm-arm/early_printk.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/xen/include/asm-arm/early_printk.h b/xen/include/asm-arm/early_printk.h index b72fce7a21..03ead23a0b 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 |