This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[v3] Fix libstdc++/13976


Hi,

this trivial patch fixes the PR. Tested x86-linux.

Seems suited also for the branch and I will apply it there too
in a few days, barring objections.

Paolo.

//////////////
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.
diff -urN libstdc++-v3-orig/include/ext/malloc_allocator.h libstdc++-v3/include/ext/malloc_allocator.h
--- libstdc++-v3-orig/include/ext/malloc_allocator.h	2004-01-29 01:18:39.000000000 +0100
+++ libstdc++-v3/include/ext/malloc_allocator.h	2004-02-02 13:06:30.000000000 +0100
@@ -77,7 +77,7 @@
       // NB: __n is permitted to be 0.  The C++ standard says nothing
       // about what the return value is when __n == 0.
       pointer
-      allocate(size_type __n, const void* __h = 0)
+      allocate(size_type __n, const void* = 0)
       { return static_cast<_Tp*>(malloc(__n * sizeof(_Tp))); }
 
       // __p is not permitted to be a null pointer.
diff -urN libstdc++-v3-orig/include/ext/mt_allocator.h libstdc++-v3/include/ext/mt_allocator.h
--- libstdc++-v3-orig/include/ext/mt_allocator.h	2004-01-31 18:38:45.000000000 +0100
+++ libstdc++-v3/include/ext/mt_allocator.h	2004-02-02 13:06:05.000000000 +0100
@@ -228,7 +228,7 @@
 
     public:
       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
diff -urN libstdc++-v3-orig/include/ext/new_allocator.h libstdc++-v3/include/ext/new_allocator.h
--- libstdc++-v3-orig/include/ext/new_allocator.h	2004-01-29 01:18:39.000000000 +0100
+++ libstdc++-v3/include/ext/new_allocator.h	2004-02-02 13:05:40.000000000 +0100
@@ -77,7 +77,7 @@
       // NB: __n is permitted to be 0.  The C++ standard says nothing
       // about what the return value is when __n == 0.
       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))); }
 
       // __p is not permitted to be a null pointer.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]