From: Julien Grall <julien.grall@linaro.org>
To: xen-devel@lists.xen.org
Cc: patches@linaro.org, ian.campbell@citrix.com,
Julien Grall <julien.grall@linaro.org>,
Stefano.Stabellini@eu.citrix.com
Subject: [PATCH] xen/arm: check string format for early_printk
Date: Thu, 23 May 2013 16:05:18 +0100 [thread overview]
Message-ID: <1369321518-26030-1-git-send-email-julien.grall@linaro.org> (raw)
Signed-off-by: Julien Grall <julien.grall@linaro.org>
---
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
next reply other threads:[~2013-05-23 15:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-23 15:05 Julien Grall [this message]
2013-05-30 8:59 ` [PATCH] xen/arm: check string format for early_printk Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1369321518-26030-1-git-send-email-julien.grall@linaro.org \
--to=julien.grall@linaro.org \
--cc=Stefano.Stabellini@eu.citrix.com \
--cc=ian.campbell@citrix.com \
--cc=patches@linaro.org \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).