annotate debugtrace_printk() with a printf compiler __attribute__
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 28 Jul 2014 14:53:35 +0000 (16:53 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 28 Jul 2014 14:53:35 +0000 (16:53 +0200)
And fix up the resulting compilation issue.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/mm/p2m.c
xen/include/xen/lib.h

index 2c7bc0fdea65988a498eb52dcc542f57063f592f..bca9f0fda4c8a7e8fe784ee2bf1c67c346cc4dcd 100644 (file)
@@ -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",
index e81b80eb8582a00924d3e906ee5652b261976368..f11b49e6dcbb06c361e0b63b54f18eb68822d360 100644 (file)
@@ -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)