From: Andrew Cooper Date: Mon, 28 Jul 2014 14:53:35 +0000 (+0200) Subject: annotate debugtrace_printk() with a printf compiler __attribute__ X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~4585 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a1833bfb491b69f0373eb069a559aedb385c67ca;p=xen.git annotate debugtrace_printk() with a printf compiler __attribute__ And fix up the resulting compilation issue. Signed-off-by: Andrew Cooper --- diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c index 2c7bc0fdea..bca9f0fda4 100644 --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c @@ -1807,7 +1807,7 @@ void audit_p2m(struct domain *d, P2M_PRINTK("p2m audit complete\n"); if ( orphans_count | mpbad | pmbad ) - P2M_PRINTK("p2m audit found %lu orphans\n", orphans); + P2M_PRINTK("p2m audit found %lu orphans\n", orphans_count); if ( mpbad | pmbad ) { P2M_PRINTK("p2m audit found %lu odd p2m, %lu bad m2p entries\n", diff --git a/xen/include/xen/lib.h b/xen/include/xen/lib.h index e81b80eb85..f11b49e6dc 100644 --- a/xen/include/xen/lib.h +++ b/xen/include/xen/lib.h @@ -75,7 +75,8 @@ int parse_bool(const char *s); /*#define DEBUG_TRACE_DUMP*/ #ifdef DEBUG_TRACE_DUMP extern void debugtrace_dump(void); -extern void debugtrace_printk(const char *fmt, ...); +extern void debugtrace_printk(const char *fmt, ...) + __attribute__ ((format (printf, 1, 2))); #else #define debugtrace_dump() ((void)0) #define debugtrace_printk(_f, ...) ((void)0)