[PATCH 32/37] xfree86/int10: mark printk as gnu_printf.

Keith Packard keithp at keithp.com
Sun Nov 17 00:01:57 PST 2013


Signed-off-by: Keith Packard <keithp at keithp.com>
---
 hw/xfree86/int10/xf86x86emu.c   | 3 +++
 hw/xfree86/x86emu/x86emu/regs.h | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/hw/xfree86/int10/xf86x86emu.c b/hw/xfree86/int10/xf86x86emu.c
index 0f8737b..63268f4 100644
--- a/hw/xfree86/int10/xf86x86emu.c
+++ b/hw/xfree86/int10/xf86x86emu.c
@@ -80,6 +80,9 @@ xf86Int10ExecSetup(xf86Int10InfoPtr pInt)
     return TRUE;
 }
 
+#if defined(__GNUC__) && (__GNUC__ > 3)
+__attribute__((format(gnu_printf, 1, 2)))
+#endif
 void
 printk(const char *fmt, ...)
 {
diff --git a/hw/xfree86/x86emu/x86emu/regs.h b/hw/xfree86/x86emu/x86emu/regs.h
index 2ecafa0..ef7dcaa 100644
--- a/hw/xfree86/x86emu/x86emu/regs.h
+++ b/hw/xfree86/x86emu/x86emu/regs.h
@@ -337,6 +337,9 @@ extern "C" {                    /* Use "C" linkage when in C++ mode */
 
 /* Function to log information at runtime */
 
+#if defined(__GNUC__) && (__GNUC__ > 3)
+__attribute__((format(gnu_printf, 1, 2)))
+#endif
     void printk(const char *fmt, ...);
 
 #ifdef  __cplusplus
-- 
1.8.4.2



More information about the xorg-devel mailing list