kernel32: fix a compiler warning on non-i386
Austin English
austinenglish at gmail.com
Sun Aug 30 20:03:59 CDT 2009
Tested on PowerPC/x86/x86_64.
--
-Austin
-------------- next part --------------
diff --git a/dlls/kernel32/format_msg.c b/dlls/kernel32/format_msg.c
index e8f9fbc..23bc169 100644
--- a/dlls/kernel32/format_msg.c
+++ b/dlls/kernel32/format_msg.c
@@ -61,6 +61,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(resource);
* Yes, ANSI strings in win32 resources. Go figure.
*/
+#if defined(__i386__) || defined(__sparc__)
static const WCHAR PCNTFMTWSTR[] = { '%','%','%','s',0 };
static const WCHAR FMTWSTR[] = { '%','s',0 };
@@ -122,7 +123,7 @@ static LPSTR load_messageA( HMODULE module, UINT id, WORD lang )
TRACE("returning %s\n", wine_dbgstr_a(buffer));
return buffer;
}
-
+#endif /* __i386__ || __sparc__ */
/***********************************************************************
* FormatMessageA (KERNEL32.@)
@@ -137,7 +138,6 @@ DWORD WINAPI FormatMessageA(
DWORD nSize,
__ms_va_list* _args )
{
- LPDWORD args=(LPDWORD)_args;
DWORD ret = 0;
#if defined(__i386__) || defined(__sparc__)
/* This implementation is completely dependent on the format of the va_list on x86 CPUs */
@@ -147,6 +147,7 @@ DWORD WINAPI FormatMessageA(
DWORD width = dwFlags & FORMAT_MESSAGE_MAX_WIDTH_MASK;
BOOL eos = FALSE;
CHAR ch;
+ LPDWORD args=(LPDWORD)_args;
TRACE("(0x%x,%p,%d,0x%x,%p,%d,%p)\n",
dwFlags,lpSource,dwMessageId,dwLanguageId,lpBuffer,nSize,args);
@@ -368,7 +369,6 @@ DWORD WINAPI FormatMessageW(
DWORD nSize,
__ms_va_list* _args )
{
- LPDWORD args=(LPDWORD)_args;
#if defined(__i386__) || defined(__sparc__)
/* This implementation is completely dependent on the format of the va_list on x86 CPUs */
LPWSTR target,t;
@@ -377,6 +377,7 @@ DWORD WINAPI FormatMessageW(
DWORD width = dwFlags & FORMAT_MESSAGE_MAX_WIDTH_MASK;
BOOL eos = FALSE;
WCHAR ch;
+ LPDWORD args=(LPDWORD)_args;
static const WCHAR fmt_wc[] = {'%','w','c',0};
TRACE("(0x%x,%p,%d,0x%x,%p,%d,%p)\n",
More information about the wine-patches
mailing list