mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 18:21:39 +01:00
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>
This commit is contained in:
1 parent
cafdceb66e
commit
54353cae09
1 file changed
+10
-4
@@ -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
|
||||
|
||||
|
||||