* crt/crt0_c.c (main): Use __UNUSED_PARAM instead of
__attribute__ ((__unused__))
* crt/crt0_w.c (wmain): Likewise.
* crt/crtexe.c (__mingw_invalidParameterHandler): Likewise.
* crt/dllentry.c (DllEntryPoint): Likewise.
* crt/dllmain.c (DllMain): Likewise.
* misc/alarm.c (alarm): Likewise.
git-svn-id: svn+ssh://svn.code.sf.net/p/mingw-w64/code/trunk@2897 4407c894-4637-0410-b4f5-ada5f102cad1
diff --git a/mingw-w64-crt/ChangeLog b/mingw-w64-crt/ChangeLog
index 195ce14..0412138 100644
--- a/mingw-w64-crt/ChangeLog
+++ b/mingw-w64-crt/ChangeLog
@@ -1,3 +1,13 @@
+2010-07-19 Ozkan Sezer <sezeroz@gmail.com>
+
+ * crt/crt0_c.c (main): Use __UNUSED_PARAM instead of
+ __attribute__ ((__unused__))
+ * crt/crt0_w.c (wmain): Likewise.
+ * crt/crtexe.c (__mingw_invalidParameterHandler): Likewise.
+ * crt/dllentry.c (DllEntryPoint): Likewise.
+ * crt/dllmain.c (DllMain): Likewise.
+ * misc/alarm.c (alarm): Likewise.
+
2010-07-17 Ozkan Sezer <sezeroz@gmail.com>
* libsrc/strmiids.c: Added new ids added to ksuuids.h:
diff --git a/mingw-w64-crt/crt/crt0_c.c b/mingw-w64-crt/crt/crt0_c.c
index f36772e..165eee1 100644
--- a/mingw-w64-crt/crt/crt0_c.c
+++ b/mingw-w64-crt/crt/crt0_c.c
@@ -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);
diff --git a/mingw-w64-crt/crt/crt0_w.c b/mingw-w64-crt/crt/crt0_w.c
index ebd7884..9f46e38 100644
--- a/mingw-w64-crt/crt/crt0_w.c
+++ b/mingw-w64-crt/crt/crt0_w.c
@@ -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);
diff --git a/mingw-w64-crt/crt/crtexe.c b/mingw-w64-crt/crt/crtexe.c
index fda9229..71c934e 100644
--- a/mingw-w64-crt/crt/crtexe.c
+++ b/mingw-w64-crt/crt/crtexe.c
@@ -458,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);
diff --git a/mingw-w64-crt/crt/dllentry.c b/mingw-w64-crt/crt/dllentry.c
index e765895..d2ed1b5 100644
--- a/mingw-w64-crt/crt/dllentry.c
+++ b/mingw-w64-crt/crt/dllentry.c
@@ -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;
}
diff --git a/mingw-w64-crt/crt/dllmain.c b/mingw-w64-crt/crt/dllmain.c
index 834e5a8..7f97b0a 100644
--- a/mingw-w64-crt/crt/dllmain.c
+++ b/mingw-w64-crt/crt/dllmain.c
@@ -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;
}
diff --git a/mingw-w64-crt/crt/tlsthrd.c b/mingw-w64-crt/crt/tlsthrd.c
index 2e76727..6fbd47a 100644
--- a/mingw-w64-crt/crt/tlsthrd.c
+++ b/mingw-w64-crt/crt/tlsthrd.c
@@ -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)
{
diff --git a/mingw-w64-crt/misc/alarm.c b/mingw-w64-crt/misc/alarm.c
index 16402a2..9d3272a 100644
--- a/mingw-w64-crt/misc/alarm.c
+++ b/mingw-w64-crt/misc/alarm.c
@@ -4,9 +4,11 @@
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
+#include <_mingw.h>
+
unsigned int alarm(unsigned int);
-unsigned int alarm(unsigned int seconds __attribute__ ((__unused__)))
+unsigned int alarm(unsigned int __UNUSED_PARAM(seconds))
{
return 0;
}