hw/xwin: Use X_ATTRIBUTE_PRINTF where suggested for winerror.c

Also, fix the typoed name OsVenderVErrorF (sic), so it actually gets prototyped
and remove redundant declarations of it's prototype.

winerror.c: In function ‘OsVendorVErrorF’:
winerror.c:56:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wmissing-format-attribute]
winerror.c: In function ‘winMessageBoxF’:
winerror.c:104: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>
This commit is contained in:
Jon TURNEY 2012-10-11 19:32:24 +01:00
parent 13fb6b36b8
commit 3d6e6a394e
4 changed files with 4 additions and 15 deletions

View File

@ -77,11 +77,6 @@ static void
winClipboardShutdown(void); winClipboardShutdown(void);
#endif #endif
#if defined(DDXOSVERRORF)
void
OsVendorVErrorF(const char *pszFormat, va_list va_args);
#endif
static Bool static Bool
winCheckDisplayNumber(void); winCheckDisplayNumber(void);

View File

@ -857,11 +857,13 @@ void
#ifdef DDXOSVERRORF #ifdef DDXOSVERRORF
void void
OSVenderVErrorF(const char *pszFormat, va_list va_args); OsVendorVErrorF(const char *pszFormat, va_list va_args)
_X_ATTRIBUTE_PRINTF(1, 0);
#endif #endif
void void
winMessageBoxF(const char *pszError, UINT uType, ...); winMessageBoxF(const char *pszError, UINT uType, ...)
_X_ATTRIBUTE_PRINTF(1, 3);
#ifdef XWIN_NATIVEGDI #ifdef XWIN_NATIVEGDI
/* /*

View File

@ -36,10 +36,6 @@
#include "win.h" #include "win.h"
#ifdef DDXOSVERRORF #ifdef DDXOSVERRORF
/* Prototype */
void
OsVendorVErrorF(const char *pszFormat, va_list va_args);
void void
OsVendorVErrorF(const char *pszFormat, va_list va_args) OsVendorVErrorF(const char *pszFormat, va_list va_args)
{ {

View File

@ -56,10 +56,6 @@ void
void void
winLogVersionInfo(void); winLogVersionInfo(void);
#ifdef DDXOSVERRORF
void OsVendorVErrorF(const char *pszFormat, va_list va_args);
#endif
/* /*
* Process arguments on the command line * Process arguments on the command line
*/ */