summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2012-10-11 19:35:19 +0100
committerJon TURNEY <jon.turney@dronecode.org.uk>2012-10-16 22:29:53 +0100
commite59cc83bcdca6b64c1bfb2de395d741757f615f6 (patch)
tree2676843388979258a0c151f74a762eba323a688e
parent3d6e6a394ea2d5dcb77aa706f751423315d8a7ed (diff)
hw/xwin: Use X_ATTRIBUTE_PRINTF where suggested for winmsg.c
winmsg.c: In function ‘winVMsg’: winmsg.c:47:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wmissing-format-attribute] winmsg.c: In function ‘winDrvMsg’: winmsg.c:56:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wmissing-format-attribute] winmsg.c: In function ‘winMsg’: winmsg.c:66:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wmissing-format-attribute] winmsg.c: In function ‘winDrvMsgVerb’: winmsg.c:77:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wmissing-format-attribute] winmsg.c: In function ‘winMsgVerb’: winmsg.c:87:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wmissing-format-attribute] winmsg.c: In function ‘winErrorFVerb’: winmsg.c:97:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wmissing-format-attribute] winmsg.c: In function ‘winDebug’: winmsg.c:107:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wmissing-format-attribute] winmsg.c: In function ‘winTrace’: winmsg.c:117:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wmissing-format-attribute] Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
-rw-r--r--hw/xwin/winmsg.c4
-rw-r--r--hw/xwin/winmsg.h30
2 files changed, 25 insertions, 9 deletions
diff --git a/hw/xwin/winmsg.c b/hw/xwin/winmsg.c
index 07c2f30eb..57c1d1888 100644
--- a/hw/xwin/winmsg.c
+++ b/hw/xwin/winmsg.c
@@ -38,7 +38,9 @@
#endif
#include <stdarg.h>
-void winVMsg(int, MessageType, int verb, const char *, va_list);
+void
+winVMsg(int, MessageType, int verb, const char *, va_list)
+_X_ATTRIBUTE_PRINTF(4, 0);
void
winVMsg(int scrnIndex, MessageType type, int verb, const char *format,
diff --git a/hw/xwin/winmsg.h b/hw/xwin/winmsg.h
index ec285ba1f..b638f2cb3 100644
--- a/hw/xwin/winmsg.h
+++ b/hw/xwin/winmsg.h
@@ -34,15 +34,29 @@
* Function prototypes
*/
-void winDrvMsgVerb(int scrnIndex,
- MessageType type, int verb, const char *format, ...);
-void winDrvMsg(int scrnIndex, MessageType type, const char *format, ...);
-void winMsgVerb(MessageType type, int verb, const char *format, ...);
-void winMsg(MessageType type, const char *format, ...);
-void winDebug(const char *format, ...);
-void winTrace(const char *format, ...);
+void
+winDrvMsgVerb(int scrnIndex,
+ MessageType type, int verb, const char *format, ...)
+_X_ATTRIBUTE_PRINTF(4, 5);
+void
+winDrvMsg(int scrnIndex, MessageType type, const char *format, ...)
+_X_ATTRIBUTE_PRINTF(3, 4);
+void
+winMsgVerb(MessageType type, int verb, const char *format, ...)
+_X_ATTRIBUTE_PRINTF(3, 4);
+void
+winMsg(MessageType type, const char *format, ...)
+_X_ATTRIBUTE_PRINTF(2, 3);
+void
+winDebug(const char *format, ...)
+_X_ATTRIBUTE_PRINTF(1, 2);
+void
+winTrace(const char *format, ...)
+_X_ATTRIBUTE_PRINTF(1, 2);
-void winErrorFVerb(int verb, const char *format, ...);
+void
+winErrorFVerb(int verb, const char *format, ...)
+_X_ATTRIBUTE_PRINTF(2, 3);
void winW32Error(int verb, const char *message);
void winW32ErrorEx(int verb, const char *message, DWORD errorcode);
void winDebugWin32Message(const char *function, HWND hwnd, UINT message,