Author: akhaldi
Date: Mon Jul 19 09:58:51 2010
New Revision: 48114
URL:
http://svn.reactos.org/svn/reactos?rev=48114&view=rev
Log:
[MINGW]
- __attribute__ ((__unused__)) -> __UNUSED_PARAM, which is MSVC compatible.
Modified:
trunk/reactos/lib/3rdparty/mingw/crt0_c.c
trunk/reactos/lib/3rdparty/mingw/crt0_w.c
trunk/reactos/lib/3rdparty/mingw/crtexe.c
trunk/reactos/lib/3rdparty/mingw/dllentry.c
trunk/reactos/lib/3rdparty/mingw/dllmain.c
trunk/reactos/lib/3rdparty/mingw/tlsthrd.c
Modified: trunk/reactos/lib/3rdparty/mingw/crt0_c.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/mingw/crt0_c.…
==============================================================================
--- trunk/reactos/lib/3rdparty/mingw/crt0_c.c [iso-8859-1] (original)
+++ trunk/reactos/lib/3rdparty/mingw/crt0_c.c [iso-8859-1] Mon Jul 19 09:58:51 2010
@@ -11,9 +11,9 @@
extern DWORD __mingw_winmain_nShowCmd;
/*ARGSUSED*/
-int main (int flags __attribute__ ((__unused__)),
- char **cmdline __attribute__ ((__unused__)),
- char **inst __attribute__ ((__unused__)))
+int main (int __UNUSED_PARAM(flags),
+ char ** __UNUSED_PARAM(cmdline),
+ char ** __UNUSED_PARAM(inst))
{
return (int) WinMain (__mingw_winmain_hInstance, NULL,
__mingw_winmain_lpCmdLine, __mingw_winmain_nShowCmd);
Modified: trunk/reactos/lib/3rdparty/mingw/crt0_w.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/mingw/crt0_w.…
==============================================================================
--- trunk/reactos/lib/3rdparty/mingw/crt0_w.c [iso-8859-1] (original)
+++ trunk/reactos/lib/3rdparty/mingw/crt0_w.c [iso-8859-1] Mon Jul 19 09:58:51 2010
@@ -16,9 +16,9 @@
int wmain (int, wchar_t **, wchar_t **);
/*ARGSUSED*/
-int wmain (int flags __attribute__ ((__unused__)),
- wchar_t **cmdline __attribute__ ((__unused__)),
- wchar_t **inst __attribute__ ((__unused__)))
+int wmain (int __UNUSED_PARAM(flags),
+ wchar_t ** __UNUSED_PARAM(cmdline),
+ wchar_t ** __UNUSED_PARAM(inst))
{
return (int) wWinMain (__mingw_winmain_hInstance, NULL,
__mingw_winmain_lpCmdLine, __mingw_winmain_nShowCmd);
Modified: trunk/reactos/lib/3rdparty/mingw/crtexe.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/mingw/crtexe.…
==============================================================================
--- trunk/reactos/lib/3rdparty/mingw/crtexe.c [iso-8859-1] (original)
+++ trunk/reactos/lib/3rdparty/mingw/crtexe.c [iso-8859-1] Mon Jul 19 09:58:51 2010
@@ -20,7 +20,6 @@
#include <tchar.h>
#include <sect_attribs.h>
#include <locale.h>
-#include <intrin.h>
#ifndef __winitenv
extern wchar_t *** __MINGW_IMP_SYMBOL(__winitenv);
@@ -52,11 +51,7 @@
#define _commode (* __MINGW_IMP_SYMBOL(_commode))
extern int _dowildcard;
-#if defined(__GNUC__)
int _MINGW_INSTALL_DEBUG_MATHERR __attribute__((weak)) = 0;
-#else
-int _MINGW_INSTALL_DEBUG_MATHERR = 0;
-#endif
extern int __defaultmatherr;
extern _CRTIMP void __cdecl _initterm(_PVFV *, _PVFV *);
@@ -251,7 +246,7 @@
#ifdef _MBCS
if (_ismbblead (*lpszCommandLine))
{
- if (*lpszCommandLine)
+ if (lpszCommandLine) /* FIXME: Why this check? Should I check for *lpszCommandLine
!= 0 too? */
lpszCommandLine++;
}
#endif
@@ -463,12 +458,17 @@
}
#endif
+#ifdef __MINGW_SHOW_INVALID_PARAMETER_EXCEPTION
+#define __UNUSED_PARAM_1(x) x
+#else
+#define __UNUSED_PARAM_1 __UNUSED_PARAM
+#endif
static void
-__mingw_invalidParameterHandler (const wchar_t *expression __attribute__ ((__unused__)),
- const wchar_t *function __attribute__ ((__unused__)),
- const wchar_t *file __attribute__ ((__unused__)),
- unsigned int line __attribute__ ((__unused__)),
- uintptr_t pReserved __attribute__ ((__unused__)))
+__mingw_invalidParameterHandler (const wchar_t * __UNUSED_PARAM_1(expression),
+ const wchar_t * __UNUSED_PARAM_1(function),
+ const wchar_t * __UNUSED_PARAM_1(file),
+ unsigned int __UNUSED_PARAM_1(line),
+ uintptr_t __UNUSED_PARAM(pReserved))
{
#ifdef __MINGW_SHOW_INVALID_PARAMETER_EXCEPTION
wprintf(L"Invalid parameter detected in function %s. File: %s Line: %d\n",
function, file, line);
Modified: trunk/reactos/lib/3rdparty/mingw/dllentry.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/mingw/dllentr…
==============================================================================
--- trunk/reactos/lib/3rdparty/mingw/dllentry.c [iso-8859-1] (original)
+++ trunk/reactos/lib/3rdparty/mingw/dllentry.c [iso-8859-1] Mon Jul 19 09:58:51 2010
@@ -10,9 +10,9 @@
BOOL WINAPI DllEntryPoint (HANDLE, DWORD, LPVOID);
-BOOL WINAPI DllEntryPoint (HANDLE hDllHandle __attribute__ ((__unused__)),
- DWORD dwReason __attribute__ ((__unused__)),
- LPVOID lpreserved __attribute__ ((__unused__)))
+BOOL WINAPI DllEntryPoint (HANDLE __UNUSED_PARAM(hDllHandle),
+ DWORD __UNUSED_PARAM(dwReason),
+ LPVOID __UNUSED_PARAM(lpreserved))
{
return TRUE;
}
Modified: trunk/reactos/lib/3rdparty/mingw/dllmain.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/mingw/dllmain…
==============================================================================
--- trunk/reactos/lib/3rdparty/mingw/dllmain.c [iso-8859-1] (original)
+++ trunk/reactos/lib/3rdparty/mingw/dllmain.c [iso-8859-1] Mon Jul 19 09:58:51 2010
@@ -2,9 +2,9 @@
#define _DECL_DLLMAIN
#include <process.h>
-BOOL WINAPI DllMain (HANDLE hDllHandle __attribute__ ((__unused__)),
- DWORD dwReason __attribute__ ((__unused__)),
- LPVOID lpreserved __attribute__ ((__unused__)))
+BOOL WINAPI DllMain (HANDLE __UNUSED_PARAM(hDllHandle),
+ DWORD __UNUSED_PARAM(dwReason),
+ LPVOID __UNUSED_PARAM(lpreserved))
{
return TRUE;
}
Modified: trunk/reactos/lib/3rdparty/mingw/tlsthrd.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/mingw/tlsthrd…
==============================================================================
--- trunk/reactos/lib/3rdparty/mingw/tlsthrd.c [iso-8859-1] (original)
+++ trunk/reactos/lib/3rdparty/mingw/tlsthrd.c [iso-8859-1] Mon Jul 19 09:58:51 2010
@@ -118,9 +118,9 @@
}
WINBOOL
-__mingw_TLScallback (HANDLE hDllHandle __attribute__ ((__unused__)),
+__mingw_TLScallback (HANDLE __UNUSED_PARAM(hDllHandle),
DWORD reason,
- LPVOID reserved __attribute__ ((__unused__)))
+ LPVOID __UNUSED_PARAM(reserved))
{
switch (reason)
{