* include/gc_allocator.h (GC_ATTR_UNUSED): Remove.
* tests/test_cpp.cc (ATTR_UNUSED): Likewise.
* include/gc_allocator.h (gc_allocator::deallocate,
gc_allocator_ignore_off_page::deallocate,
traceable_allocator::deallocate): Comment out unused argument name
instead of using GC_ATTR_UNUSED.
* include/gc_cpp.h [_MSC_VER && !GC_DEBUG] (operator new): Comment out
unused argument names.
* tests/test_cpp.cc [(MSWIN32 && !__MINGW32__ || MSWINCE)
&& !NO_WINMAIN_ENTRY] (WinMain): Comment out unused argument names
instead of using ATTR_UNUSED.
#include "gc.h"
#include <new> // for placement new
-#if defined(__GNUC__)
-# define GC_ATTR_UNUSED __attribute__((__unused__))
-#else
-# define GC_ATTR_UNUSED
-#endif
-
#ifndef GC_ATTR_EXPLICIT
# if (__cplusplus >= 201103L) || defined(CPPCHECK)
# define GC_ATTR_EXPLICIT explicit
}
// __p is not permitted to be a null pointer.
- void deallocate(pointer __p, size_type GC_ATTR_UNUSED GC_n)
+ void deallocate(pointer __p, size_type /* GC_n */)
{ GC_FREE(__p); }
size_type max_size() const throw()
}
// __p is not permitted to be a null pointer.
- void deallocate(pointer __p, size_type GC_ATTR_UNUSED GC_n)
+ void deallocate(pointer __p, size_type /* GC_n */)
{ GC_FREE(__p); }
size_type max_size() const throw()
}
// __p is not permitted to be a null pointer.
- void deallocate(pointer __p, size_type GC_ATTR_UNUSED GC_n)
+ void deallocate(pointer __p, size_type /* GC_n */)
{ GC_FREE(__p); }
size_type max_size() const throw()
}
// This new operator is used by VC++ in case of Debug builds:
- inline void* operator new(size_t size, int /* nBlockUse */,
- const char* szFileName, int nLine)
- {
-# ifndef GC_DEBUG
- return GC_malloc_uncollectable(size);
-# else
+# ifdef GC_DEBUG
+ inline void* operator new(size_t size, int /* nBlockUse */,
+ const char* szFileName, int nLine)
+ {
return GC_debug_malloc_uncollectable(size, szFileName, nLine);
-# endif
- }
+ }
+# else
+ inline void* operator new(size_t size, int /* nBlockUse */,
+ const char* /* szFileName */, int /* nLine */)
+ {
+ return GC_malloc_uncollectable(size);
+ }
+# endif /* !GC_DEBUG */
# if _MSC_VER > 1020
// This new operator is used by VC++ 7+ in Debug builds:
__LINE__ ); \
exit( 1 ); }
-#if GC_GNUC_PREREQ(3, 4)
-# define ATTR_UNUSED __attribute__((__unused__))
-#else
-# define ATTR_UNUSED /* empty */
-#endif
-
#ifndef GC_ATTR_EXPLICIT
# if (__cplusplus >= 201103L) || defined(CPPCHECK)
# define GC_ATTR_EXPLICIT explicit
#if ((defined(MSWIN32) && !defined(__MINGW32__)) || defined(MSWINCE)) \
&& !defined(NO_WINMAIN_ENTRY)
- int APIENTRY WinMain( HINSTANCE instance ATTR_UNUSED,
- HINSTANCE prev ATTR_UNUSED, LPSTR cmd,
- int cmdShow ATTR_UNUSED )
+ int APIENTRY WinMain( HINSTANCE /* instance */, HINSTANCE /* prev */,
+ LPSTR cmd, int /* cmdShow */)
{
int argc = 0;
char* argv[ 3 ];