* dtc: Allow gcc format warnings for check_msg()
@ 2007-12-07 7:08 David Gibson
0 siblings, 0 replies; only message in thread
From: David Gibson @ 2007-12-07 7:08 UTC (permalink / raw)
To: Jon Loeliger; +Cc: linuxppc-dev
check_msg() takes printf() like arguments, so tell gcc to produce
printf() like warnings for it.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Index: dtc/checks.c
===================================================================
--- dtc.orig/checks.c 2007-12-07 17:10:23.000000000 +1100
+++ dtc/checks.c 2007-12-07 17:13:16.000000000 +1100
@@ -87,6 +87,9 @@ struct check {
#define BATCH_CHECK(nm, lvl, ...) \
CHECK(nm, NULL, NULL, NULL, NULL, lvl, __VA_ARGS__)
+#ifdef __GNUC__
+static inline void check_msg(struct check *c, const char *fmt, ...) __attribute__((format (printf, 2, 3)));
+#endif
static inline void check_msg(struct check *c, const char *fmt, ...)
{
va_list ap;
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-12-07 7:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-07 7:08 dtc: Allow gcc format warnings for check_msg() David Gibson
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).