Browse Source

dtc: Allow gcc format warnings for check_msg()

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>
main
David Gibson 17 years ago committed by Jon Loeliger
parent
commit
b7c5eaf3ee
  1. 3
      checks.c

3
checks.c

@ -87,6 +87,9 @@ struct check { @@ -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;

Loading…
Cancel
Save