Commit 90f8b692 by Paolo Carlini Committed by Paolo Carlini

re PR libstdc++/13976 (ext/new_allocator.h:81: warning: unused parameter '__h')

2004-02-02  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/13976
	* include/ext/malloc_allocator.h (malloc_allocator::allocate):
	Make the second parameter unnamed, to void unused parameter
	warnings.
	* include/ext/mt_allocator.h (__mt_alloc::allocate): Ditto.
	* include/ext/new_allocator.h (new_allocator::allocate): Ditto.

From-SVN: r77111
parent 6e937c1c
2004-02-02 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/13976
* include/ext/malloc_allocator.h (malloc_allocator::allocate):
Make the second parameter unnamed, to void unused parameter
warnings.
* include/ext/mt_allocator.h (__mt_alloc::allocate): Ditto.
* include/ext/new_allocator.h (new_allocator::allocate): Ditto.
2004-02-01 Paolo Carlini <pcarlini@suse.de> 2004-02-01 Paolo Carlini <pcarlini@suse.de>
* include/bits/stl_algo.h: Additional minor tweaks. * include/bits/stl_algo.h: Additional minor tweaks.
......
...@@ -77,7 +77,7 @@ namespace __gnu_cxx ...@@ -77,7 +77,7 @@ namespace __gnu_cxx
// NB: __n is permitted to be 0. The C++ standard says nothing // NB: __n is permitted to be 0. The C++ standard says nothing
// about what the return value is when __n == 0. // about what the return value is when __n == 0.
pointer pointer
allocate(size_type __n, const void* __h = 0) allocate(size_type __n, const void* = 0)
{ return static_cast<_Tp*>(malloc(__n * sizeof(_Tp))); } { return static_cast<_Tp*>(malloc(__n * sizeof(_Tp))); }
// __p is not permitted to be a null pointer. // __p is not permitted to be a null pointer.
......
...@@ -228,7 +228,7 @@ namespace __gnu_cxx ...@@ -228,7 +228,7 @@ namespace __gnu_cxx
public: public:
pointer pointer
allocate(size_t __n, const void* __h = 0) allocate(size_t __n, const void* = 0)
{ {
/* /*
* Although the test in __gthread_once() would suffice, we * Although the test in __gthread_once() would suffice, we
......
...@@ -77,7 +77,7 @@ namespace __gnu_cxx ...@@ -77,7 +77,7 @@ namespace __gnu_cxx
// NB: __n is permitted to be 0. The C++ standard says nothing // NB: __n is permitted to be 0. The C++ standard says nothing
// about what the return value is when __n == 0. // about what the return value is when __n == 0.
pointer pointer
allocate(size_type __n, const void* __h = 0) allocate(size_type __n, const void* = 0)
{ return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp))); } { return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp))); }
// __p is not permitted to be a null pointer. // __p is not permitted to be a null pointer.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment