This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

Re: [RFC] : Compiling libstdc++ with warnings on


Paolo Carlini wrote:

>Thanks Chris. In fact some changes seem to me trivially correct and
>clean and there are very good chances that I will split out and commit
>those bits even before new year ;)
>
Well, the below set of changes is either trivially correct or I cannot
even imagine a better way to fix the issue. Assuming nobody objects,
tomorrow I will commit it to both mainline and 4_1-branch. Will get soon
to the rest...

Tested x86-linux.

Paolo.

///////////////////
2005-12-26  Chris Jefferson  <chris@bubblescope.net>

	* include/ext/mt_allocator.h (__mt_alloc::__mt_alloc): Remove
	name of unused parameter.
	* include/bits/stream_iterator.h (istream_iterator::istream_iterator):
	Construct _M_value.
	* include/debug/functions.h (__check_valid_range): Add
	__attribute__((unused)).
	* include/tr1/hashtable (hashtable::end): Remove name of unused
	parameter.
	* include/tr1/tuple_iterate.h (tuple::tuple): Likewise.
	(tuple::operator=): Add __attribute__((unused)).
	* include/tr1/functional (Fnv_hash<4>::hash): Add static_cast.
	(Fnv_hash<8>::hash): Likewise.

	* testsuite/25_algorithms/iter_swap/20577.cc (swap): Remove name of
	unused parameter.
	* testsuite/25_algorithms/unique_copy/check_type.cc (S2::S2,X2::X2):
	Likewise.
	* testsuite/22_locale/ctype/narrow/char/19955.cc (do_narrow): Likewise.
	* testsuite/22_locale/ctype/is/char/9858.cc (Derived::do_is, 
	Derived::do_scan_is, Derived::do_scan_not, Derived2::do_is,
	Derived2::do_scan_is, Derived2::do_scan_not): Likewise.
	* testsuite/22_locale/time_put/put/wchar_t/12439_1.cc (TP::do_put):
	Likewise.
	* testsuite/22_locale/time_put/put/wchar_t/12439_3.cc (TP::do_put):
	Likewise.
	* testsuite/22_locale/time_put/put/char/12439_1.cc (TP::do_put):
	Likewise.
	* testsuite/22_locale/time_put/put/char/12439_3.cc (TP::do_put):
	Likewise.
	* testsuite/testsuite_io.h (fail_num_get::do_get, fail_num_put::do_put):
	Likewise.
	* testsuite/25_algorithms/find/17441.cc (find): Likewise.
	* testsuite/23_containers/vector/cons/clear_allocator.cc
	(clear_alloc::clear_alloc): Likewise.
	* testsuite/23_containers/vector/bool/clear_allocator.cc
	(clear_alloc::clear_alloc): Likewise.
	* testsuite/23_containers/list/cons/clear_allocator.cc
	(clear_alloc::clear_alloc): Likewise.
	* testsuite/23_containers/set/modifiers/16728.cc (test_container):
	Likewise.
	* testsuite/27_io/basic_ios/cons/char/3.cc (char_traits::to_char_type,
	to_int_type): Likewise.
	* testsuite/27_io/basic_filebuf/imbue/12206.cc (codecvt::do_out, do_in,
	do_unshift, do_length): Likewise.
	* testsuite/21_strings/basic_string/capacity/1.cc 
	(operator==(A<T>,A<T>), operator<(A<T>,A<T>),
	char_traits::to_char_type, char_traits::to_int_type): Likewise
	* testsuite/testsuite_character.h (ctype::do_is, ctype::do_scan_is,
	ctype::do_scan_not, do_toupper, do_tolower): Likewise.
	* testsuite/25_algorithms/replace_copy/check_type.cc (Z::operator=):
	Add missing return statement.
	* testsuite/25_algorithms/replace_copy_if/check_type.cc (Z::operator=):
	Likewise.
	* testsuite/testsuite_iterators.h (output_iterator_wrapper::operator=,
	random_access_iterator_wrapper::operator==): Likewise.
	* testsuite/20_util/functional/binders/1.cc (s::f_int_int_const,
	s::f_int_int, s::f_int_void_const, s::f_int_void): Likewise.
	* testsuite/27_io/types/1.cc (test01): Likewise.
	* testsuite/27_io/basic_ostream/write/wchar_t/1.cc (test01): Likewise.
	* testsuite/27_io/basic_ostream/write/char/1.cc (test01): Likewise.
	* testsuite/21_strings/c_strings/wchar_t/24559.cc (main): Likewise.
	* testsuite/27_io/basic_istream/ignore/wchar_t/2.cc (check): Add static
	cast.
	* testsuite/27_io/basic_istream/ignore/char/2.cc (check): Likewise.
	* testsuite/27_io/basic_istream/getline/wchar_t/5.cc (check): Likewise.
	* testsuite/27_io/basic_istream/getline/char/5.cc (check): Likewise.
	* testsuite/testsuite_allocator.h (check_new): Likewise.
	(check_deallocate_null): Add missing return value.
	* testsuite/ext/pool_allocator/allocate_chunk.cc (test01):
	Make variable unsigned.
	* testsuite/23_containers/vector/modifiers/erase/1.cc (N,N1,N2,N3,N4,
	N5,test01): Likewise.
	* testsuite/26_numerics/valarray/valarray_subset_assignment.cc
	(check_array): Likewise.
	(main): Removed unused variable.
	* testsuite/27_io/basic_streambuf/in_avail/wchar_t/1.cc (test05):
	Removed unused variable.
	* testsuite/27_io/basic_ostream/flush/wchar_t/1.cc (test01): Likewise.
	* testsuite/27_io/basic_ostream/flush/char/1.cc (test01): Likewise.
	* testsuite/27_io/basic_ostream/endl/wchar_t/1.cc (test01): Likewise.
	* testsuite/27_io/basic_ostream/endl/char/1.cc (test01): Likewise.
	* testsuite/27_io/basic_ostream/ends/wchar_t/1.cc (test01): Likewise.
	* testsuite/27_io/basic_ostream/ends/char/1.cc (test01): Likewise.
	* testsuite/tr1/2_general_utilities/memory/shared_ptr/
	assign/shared_ptr.cc (test01): Correct return type.	
	* testsuite/27_io/basic_filebuf/close/char/2.cc (test_02):
	Add default value to close_num.
Index: include/ext/mt_allocator.h
===================================================================
--- include/ext/mt_allocator.h	(revision 108948)
+++ include/ext/mt_allocator.h	(working copy)
@@ -631,7 +631,7 @@
       __mt_alloc(const __mt_alloc&) throw() { }
 
       template<typename _Tp1, typename _Poolp1>
-        __mt_alloc(const __mt_alloc<_Tp1, _Poolp1>& obj) throw() { }
+        __mt_alloc(const __mt_alloc<_Tp1, _Poolp1>&) throw() { }
 
       ~__mt_alloc() throw() { }
 
Index: include/bits/stream_iterator.h
===================================================================
--- include/bits/stream_iterator.h	(revision 108948)
+++ include/bits/stream_iterator.h	(working copy)
@@ -60,7 +60,7 @@
     public:
       ///  Construct end of input stream iterator.
       istream_iterator()
-      : _M_stream(0), _M_ok(false) {}
+      : _M_stream(0), _M_value(), _M_ok(false) {}
 
       ///  Construct start of input stream iterator.
       istream_iterator(istream_type& __s)
Index: include/debug/functions.h
===================================================================
--- include/debug/functions.h	(revision 108948)
+++ include/debug/functions.h	(working copy)
@@ -154,7 +154,8 @@
   template<typename _InputIterator>
     inline _InputIterator
     __check_valid_range(const _InputIterator& __first,
-			const _InputIterator& __last)
+			const _InputIterator& __last
+			__attribute__((__unused__)))
     {
       _GLIBCXX_DEBUG_ASSERT(__valid_range(__first, __last));
       return __first;
@@ -163,7 +164,8 @@
   /** Checks that __s is non-NULL or __n == 0, and then returns __s. */
   template<typename _CharT, typename _Integer>
     inline const _CharT*
-    __check_string(const _CharT* __s, const _Integer& __n)
+    __check_string(const _CharT* __s,
+		   const _Integer& __n __attribute__((__unused__)))
     {
 #ifdef _GLIBCXX_DEBUG_PEDANTIC
       _GLIBCXX_DEBUG_ASSERT(__s != 0 || __n == 0);
Index: include/tr1/hashtable
===================================================================
--- include/tr1/hashtable	(revision 108948)
+++ include/tr1/hashtable	(working copy)
@@ -1103,7 +1103,7 @@
       { return local_iterator(m_buckets[n]); }
   
       local_iterator
-      end(size_type n)
+      end(size_type)
       { return local_iterator(0); }
   
       const_local_iterator
@@ -1111,7 +1111,7 @@
       { return const_local_iterator(m_buckets[n]); }
   
       const_local_iterator
-      end(size_type n) const
+      end(size_type) const
       { return const_local_iterator(0); }
 
       float
Index: include/tr1/tuple_iterate.h
===================================================================
--- include/tr1/tuple_iterate.h	(revision 108948)
+++ include/tr1/tuple_iterate.h	(working copy)
@@ -93,13 +93,13 @@
 
 #else
 
-    tuple(const tuple& __in)
+    tuple(const tuple&)
     { }
 
 #endif
 
     tuple&
-    operator=(const tuple& __in)
+    operator=(const tuple& __in __attribute__((__unused__)) )
     {
       _GLIBCXX_TUPLE_ASSIGN
         return *this;
Index: include/tr1/functional
===================================================================
--- include/tr1/functional	(revision 108948)
+++ include/tr1/functional	(working copy)
@@ -1156,7 +1156,7 @@
       static std::size_t
       hash(const char* first, std::size_t length)
       {
-	std::size_t result = 2166136261UL;
+	std::size_t result = static_cast<std::size_t>(2166136261UL);
 	for (; length > 0; --length)
 	  {
 	    result ^= (std::size_t)*first++;
@@ -1172,7 +1172,7 @@
       static std::size_t
       hash(const char* first, std::size_t length)
       {
-	std::size_t result = 14695981039346656037ULL;
+	std::size_t result = static_cast<std::size_t>(14695981039346656037ULL);
 	for (; length > 0; --length)
 	  {
 	    result ^= (std::size_t)*first++;
Index: testsuite/25_algorithms/iter_swap/20577.cc
===================================================================
--- testsuite/25_algorithms/iter_swap/20577.cc	(revision 108948)
+++ testsuite/25_algorithms/iter_swap/20577.cc	(working copy)
@@ -47,7 +47,7 @@
 int int_swap_count;
 
 struct X {};
-void swap(X& i, X& j)
+void swap(X&, X&)
 { ++int_swap_count; }
 
 void
Index: testsuite/25_algorithms/unique_copy/check_type.cc
===================================================================
--- testsuite/25_algorithms/unique_copy/check_type.cc	(revision 108948)
+++ testsuite/25_algorithms/unique_copy/check_type.cc	(working copy)
@@ -30,7 +30,7 @@
 
 struct S2
 {
-  S2(const S1& s1) {}
+  S2(const S1&) {}
 };
 
 bool 
@@ -40,7 +40,7 @@
 
 struct X2
 {
-  X2(const X1& x1) {}
+  X2(const X1&) {}
 };
 
 bool 
Index: testsuite/25_algorithms/replace_copy/check_type.cc
===================================================================
--- testsuite/25_algorithms/replace_copy/check_type.cc	(revision 108948)
+++ testsuite/25_algorithms/replace_copy/check_type.cc	(working copy)
@@ -34,11 +34,11 @@
 {
   Z&
   operator=(const X&)
-  { }
+  { return *this; }
 
   Z&
   operator=(const Y&)
-  { }
+  { return *this; }
 };
 
 bool
Index: testsuite/25_algorithms/find/17441.cc
===================================================================
--- testsuite/25_algorithms/find/17441.cc	(revision 108948)
+++ testsuite/25_algorithms/find/17441.cc	(working copy)
@@ -24,8 +24,8 @@
 
 template<typename InputIterator, typename Tp>
   InputIterator
-  find(InputIterator first, InputIterator last,
-       const Tp& val, input_iterator_tag)
+  find(InputIterator first, InputIterator,
+       const Tp&, input_iterator_tag)
   { return first; }
 
 // libstdc++/17441
Index: testsuite/25_algorithms/replace_copy_if/check_type.cc
===================================================================
--- testsuite/25_algorithms/replace_copy_if/check_type.cc	(revision 108948)
+++ testsuite/25_algorithms/replace_copy_if/check_type.cc	(working copy)
@@ -34,11 +34,11 @@
 {
   Z&
   operator=(const X&)
-  { }
+  { return *this; }
 
   Z&
   operator=(const Y&)
-  { }
+  { return *this; }
 };
 
 bool
Index: testsuite/ext/pool_allocator/allocate_chunk.cc
===================================================================
--- testsuite/ext/pool_allocator/allocate_chunk.cc	(revision 108948)
+++ testsuite/ext/pool_allocator/allocate_chunk.cc	(working copy)
@@ -53,7 +53,7 @@
   // The constant 20 comes from __pool_alloc_base::_M_refill. See
   // also __pool_alloc_base::_M_allocate_chunk.
   __pool_alloc<small> alloc_small;
-  for (int i = 0; i < 20 * sizeof(big) / sizeof(small) + 1; ++i)
+  for (unsigned int i = 0; i < 20 * sizeof(big) / sizeof(small) + 1; ++i)
     alloc_small.allocate(1);
 }
 
Index: testsuite/22_locale/ctype/narrow/char/19955.cc
===================================================================
--- testsuite/22_locale/ctype/narrow/char/19955.cc	(revision 108948)
+++ testsuite/22_locale/ctype/narrow/char/19955.cc	(working copy)
@@ -36,7 +36,7 @@
 protected:
   const char*
   do_narrow(const char* lo, const char* hi,
-	    char dflt, char* to) const 
+	    char, char* to) const 
   {
     for (int i = 0; lo != hi; ++lo, ++to, ++i)
       *to = *lo + i;
Index: testsuite/22_locale/ctype/is/char/9858.cc
===================================================================
--- testsuite/22_locale/ctype/is/char/9858.cc	(revision 108948)
+++ testsuite/22_locale/ctype/is/char/9858.cc	(working copy)
@@ -39,15 +39,15 @@
   do_is(mask, char_type) const { return true; }
 
   const char_type* 
-  do_is(const char_type* lo, const char_type* hi, mask* vec) const 
+  do_is(const char_type*, const char_type* hi, mask*) const 
   { return hi; }
 
   const char_type* 
-  do_scan_is(mask m, const char_type* lo, const char_type* hi) const 
+  do_scan_is(mask, const char_type*, const char_type* hi) const 
   { return hi; }
 
   const char_type* 
-  do_scan_not(mask m, const char_type* lo, const char_type* hi) const 
+  do_scan_not(mask, const char_type*, const char_type* hi) const 
   { return hi; }
 };
 
@@ -58,15 +58,15 @@
   do_is(mask, char_type) const { called = 1; return true; }
 
   const char_type* 
-  do_is(const char_type* lo, const char_type* hi, mask* vec) const 
+  do_is(const char_type*, const char_type* hi, mask*) const 
   { called = 5; return hi; }
 
   const char_type* 
-  do_scan_is(mask m, const char_type* lo, const char_type* hi) const 
+  do_scan_is(mask, const char_type*, const char_type* hi) const 
   { called = 10; return hi; }
 
   const char_type* 
-  do_scan_not(mask m, const char_type* lo, const char_type* hi) const 
+  do_scan_not(mask, const char_type*, const char_type* hi) const 
   { called = 15; return hi; }
 };
 
Index: testsuite/22_locale/time_put/put/wchar_t/12439_1.cc
===================================================================
--- testsuite/22_locale/time_put/put/wchar_t/12439_1.cc	(revision 108948)
+++ testsuite/22_locale/time_put/put/wchar_t/12439_1.cc	(working copy)
@@ -31,7 +31,7 @@
 
 protected:
   iter_type do_put(iter_type s, std::ios_base&, char_type fill,
-		   const std::tm* t, char format, char modifier) const
+		   const std::tm*, char, char) const
   {
     fill_chars.push_back(fill);
     return s;
Index: testsuite/22_locale/time_put/put/wchar_t/12439_3.cc
===================================================================
--- testsuite/22_locale/time_put/put/wchar_t/12439_3.cc	(revision 108948)
+++ testsuite/22_locale/time_put/put/wchar_t/12439_3.cc	(working copy)
@@ -29,8 +29,8 @@
   mutable std::string format_chars;
 
 protected:
-  iter_type do_put(iter_type s, std::ios_base&, char_type fill,
-		   const std::tm* t, char format, char modifier) const
+  iter_type do_put(iter_type s, std::ios_base&, char_type,
+		   const std::tm*, char format, char) const
   {
     format_chars.push_back(format);
     return s;
Index: testsuite/22_locale/time_put/put/char/12439_1.cc
===================================================================
--- testsuite/22_locale/time_put/put/char/12439_1.cc	(revision 108948)
+++ testsuite/22_locale/time_put/put/char/12439_1.cc	(working copy)
@@ -31,7 +31,7 @@
 
 protected:
   iter_type do_put(iter_type s, std::ios_base&, char_type fill,
-		   const std::tm* t, char format, char modifier) const
+		   const std::tm*, char, char) const
   {
     fill_chars.push_back(fill);
     return s;
Index: testsuite/22_locale/time_put/put/char/12439_3.cc
===================================================================
--- testsuite/22_locale/time_put/put/char/12439_3.cc	(revision 108948)
+++ testsuite/22_locale/time_put/put/char/12439_3.cc	(working copy)
@@ -29,8 +29,8 @@
   mutable std::string format_chars;
 
 protected:
-  iter_type do_put(iter_type s, std::ios_base&, char_type fill,
-		   const std::tm* t, char format, char modifier) const
+  iter_type do_put(iter_type s, std::ios_base&, char_type,
+		   const std::tm*, char format, char) const
   {
     format_chars.push_back(format);
     return s;
Index: testsuite/testsuite_io.h
===================================================================
--- testsuite/testsuite_io.h	(revision 108948)
+++ testsuite/testsuite_io.h	(working copy)
@@ -214,7 +214,7 @@
 
     protected:
       iter_type 
-      do_get(iter_type a, iter_type, ios_base&, ios_base::iostate&, bool&) const
+      do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, bool&) const
       { throw facet_error(); return iter_type(); }
 
       virtual iter_type 
@@ -222,49 +222,49 @@
       { throw facet_error(); return iter_type(); }
       
       virtual iter_type 
-      do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, 
+      do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, 
 	     unsigned short&) const
       { throw facet_error(); return iter_type(); }
       
       virtual iter_type 
-      do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, 
+      do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, 
 	     unsigned int&) const
       { throw facet_error(); return iter_type(); }
       
       virtual iter_type 
-      do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, 
+      do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, 
 	     unsigned long&) const
       { throw facet_error(); return iter_type(); }
 
 #ifdef _GLIBCXX_USE_LONG_LONG 
       virtual iter_type 
-      do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, 
+      do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, 
 	     long long&) const
       { throw facet_error(); return iter_type(); }
       
       virtual iter_type 
-      do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, 
+      do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, 
 	     unsigned long long&) const
       { throw facet_error(); return iter_type(); }
 #endif
 
       virtual iter_type 
-      do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, 
+      do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, 
 	     float&) const
       { throw facet_error(); return iter_type(); }
       
       virtual iter_type 
-      do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, 
+      do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, 
 	     double&) const
       { throw facet_error(); return iter_type(); }
       
       virtual iter_type 
-      do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, 
+      do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, 
 	     long double&) const
       { throw facet_error(); return iter_type(); }
       
       virtual iter_type 
-      do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, 
+      do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, 
 	     void*&) const
       { throw facet_error(); return iter_type(); }
     };
@@ -284,37 +284,37 @@
 
     protected:
       iter_type 
-      do_put(iter_type, ios_base&, char_type __fill, bool __v) const
+      do_put(iter_type, ios_base&, char_type, bool) const
       { throw facet_error(); return iter_type(NULL); }
       
       virtual iter_type 
-      do_put(iter_type, ios_base&, char_type __fill, long __v) const
+      do_put(iter_type, ios_base&, char_type, long) const
       { throw facet_error(); return iter_type(NULL); }
 
       virtual iter_type 
-      do_put(iter_type, ios_base&, char_type __fill, unsigned long) const
+      do_put(iter_type, ios_base&, char_type, unsigned long) const
       { throw facet_error(); return iter_type(NULL); }
 
 #ifdef _GLIBCXX_USE_LONG_LONG 
       virtual iter_type 
-      do_put(iter_type, ios_base&, char_type __fill, long long __v) const
+      do_put(iter_type, ios_base&, char_type, long long) const
       { throw facet_error(); return iter_type(NULL); }
 
       virtual iter_type 
-      do_put(iter_type, ios_base&, char_type __fill, unsigned long long) const
+      do_put(iter_type, ios_base&, char_type, unsigned long long) const
       { throw facet_error(); return iter_type(NULL); }
 #endif
       
       virtual iter_type 
-      do_put(iter_type, ios_base&, char_type __fill, double __v) const
+      do_put(iter_type, ios_base&, char_type, double) const
       { throw facet_error(); return iter_type(NULL); }
 
       virtual iter_type 
-      do_put(iter_type, ios_base&, char_type __fill, long double __v) const
+      do_put(iter_type, ios_base&, char_type, long double) const
       { throw facet_error(); return iter_type(NULL); }
       
       virtual iter_type 
-      do_put(iter_type, ios_base&, char_type __fill, const void* __v) const
+      do_put(iter_type, ios_base&, char_type, const void*) const
       { throw facet_error(); return iter_type(NULL); }
     };

Index: testsuite/tr1/2_general_utilities/memory/shared_ptr/assign/shared_ptr.cc
===================================================================
--- testsuite/tr1/2_general_utilities/memory/shared_ptr/assign/shared_ptr.cc	(revision 108948)
+++ testsuite/tr1/2_general_utilities/memory/shared_ptr/assign/shared_ptr.cc	(working copy)
@@ -57,7 +57,7 @@
 // 2.2.3.3 shared_ptr assignment [tr.util.smartptr.shared.assign]
 
 // Assignment from shared_ptr<Y>
-int
+void
 test01()
 {
   reset_count_struct __attribute__((unused)) reset;
Index: testsuite/tr1/2_general_utilities/memory/shared_ptr/assign/assign.cc
===================================================================
--- testsuite/tr1/2_general_utilities/memory/shared_ptr/assign/assign.cc	(revision 108948)
+++ testsuite/tr1/2_general_utilities/memory/shared_ptr/assign/assign.cc	(working copy)
@@ -44,7 +44,7 @@
 // 2.2.3.3 shared_ptr assignment [tr.util.smartptr.shared.assign]
 
 // Assignment from shared_ptr<Y>
-int
+void
 test01()
 {
   reset_count_struct __attribute__((unused)) reset;
Index: testsuite/23_containers/vector/modifiers/erase/1.cc
===================================================================
--- testsuite/23_containers/vector/modifiers/erase/1.cc	(revision 108948)
+++ testsuite/23_containers/vector/modifiers/erase/1.cc	(working copy)
@@ -29,12 +29,12 @@
 const int A3[] = {0, 2, 3, 4, 10, 11};
 const int A4[] = {4, 10, 11};
 const int A5[] = {4, 10};
-const int  N = sizeof(A)  / sizeof(int);
-const int N1 = sizeof(A1) / sizeof(int);
-const int N2 = sizeof(A2) / sizeof(int);
-const int N3 = sizeof(A3) / sizeof(int);
-const int N4 = sizeof(A4) / sizeof(int);
-const int N5 = sizeof(A5) / sizeof(int);
+const unsigned int  N = sizeof(A)  / sizeof(int);
+const unsigned int N1 = sizeof(A1) / sizeof(int);
+const unsigned int N2 = sizeof(A2) / sizeof(int);
+const unsigned int N3 = sizeof(A3) / sizeof(int);
+const unsigned int N4 = sizeof(A4) / sizeof(int);
+const unsigned int N5 = sizeof(A5) / sizeof(int);
 
 void
 test01()
@@ -85,17 +85,17 @@
   typedef vec_type::iterator          iterator_type;
 
   vec_type v, v1, v2, v3, v4, v5;
-  for (int i = 0; i < N; ++i)
+  for (unsigned int i = 0; i < N; ++i)
     v.push_back(std::vector<int>(1, A[i]));
-  for (int i = 0; i < N1; ++i)
+  for (unsigned int i = 0; i < N1; ++i)
     v1.push_back(std::vector<int>(1, A1[i]));
-  for (int i = 0; i < N2; ++i)
+  for (unsigned int i = 0; i < N2; ++i)
     v2.push_back(std::vector<int>(1, A2[i]));
-  for (int i = 0; i < N3; ++i)
+  for (unsigned int i = 0; i < N3; ++i)
     v3.push_back(std::vector<int>(1, A3[i]));
-  for (int i = 0; i < N4; ++i)
+  for (unsigned int i = 0; i < N4; ++i)
     v4.push_back(std::vector<int>(1, A4[i]));
-  for (int i = 0; i < N5; ++i)
+  for (unsigned int i = 0; i < N5; ++i)
     v5.push_back(std::vector<int>(1, A5[i]));
   
   iterator_type it1 = v.erase(v.begin() + 1);
Index: testsuite/23_containers/vector/cons/clear_allocator.cc
===================================================================
--- testsuite/23_containers/vector/cons/clear_allocator.cc	(revision 108948)
+++ testsuite/23_containers/vector/cons/clear_allocator.cc	(working copy)
@@ -37,11 +37,11 @@
     clear_alloc() throw()
     { }
     
-    clear_alloc(clear_alloc const& _wa) throw()
+    clear_alloc(clear_alloc const&) throw() : new_allocator<T>() 
     { }
     
     template<typename T1>
-      clear_alloc(clear_alloc<T1> const& _wa) throw()
+    clear_alloc(clear_alloc<T1> const&) throw()
       { }
 
     virtual ~clear_alloc() throw()
Index: testsuite/23_containers/vector/bool/clear_allocator.cc
===================================================================
--- testsuite/23_containers/vector/bool/clear_allocator.cc	(revision 108948)
+++ testsuite/23_containers/vector/bool/clear_allocator.cc	(working copy)
@@ -37,11 +37,11 @@
     clear_alloc() throw()
     { }
     
-    clear_alloc(clear_alloc const& _wa) throw()
+    clear_alloc(clear_alloc const&) throw() : new_allocator<T>() 
     { }
     
     template<typename T1>
-      clear_alloc(clear_alloc<T1> const& _wa) throw()
+      clear_alloc(clear_alloc<T1> const&) throw()
       { }
 
     virtual ~clear_alloc() throw()
Index: testsuite/23_containers/deque/cons/clear_allocator.cc
===================================================================
--- testsuite/23_containers/deque/cons/clear_allocator.cc	(revision 108948)
+++ testsuite/23_containers/deque/cons/clear_allocator.cc	(working copy)
@@ -37,11 +37,11 @@
     clear_alloc() throw()
     { }
     
-    clear_alloc(clear_alloc const& _wa) throw()
+    clear_alloc(clear_alloc const&) throw() : new_allocator<T>() 
     { }
     
     template<typename T1>
-    clear_alloc(clear_alloc<T1> const& _wa) throw()
+    clear_alloc(clear_alloc<T1> const&) throw()
       { }
 
     virtual ~clear_alloc() throw()
Index: testsuite/23_containers/list/cons/clear_allocator.cc
===================================================================
--- testsuite/23_containers/list/cons/clear_allocator.cc	(revision 108948)
+++ testsuite/23_containers/list/cons/clear_allocator.cc	(working copy)
@@ -37,11 +37,11 @@
     clear_alloc() throw()
     { }
     
-    clear_alloc(clear_alloc const& _wa) throw()
+    clear_alloc(clear_alloc const&) throw() : new_allocator<T>() 
     { }
     
     template<typename T1>
-      clear_alloc(clear_alloc<T1> const& _wa) throw()
+    clear_alloc(clear_alloc<T1> const&) throw()
       { }
 
     virtual ~clear_alloc() throw()
Index: testsuite/23_containers/set/modifiers/16728.cc
===================================================================
--- testsuite/23_containers/set/modifiers/16728.cc	(revision 108948)
+++ testsuite/23_containers/set/modifiers/16728.cc	(working copy)
@@ -75,7 +75,7 @@
 
 template<typename Container>
   void
-  test_container(Container obj, bool run_threaded = false)
+  test_container(Container, bool run_threaded = false)
   {
     do_loop<Container>();
     std::ostringstream comment;
Index: testsuite/testsuite_iterators.h
===================================================================
--- testsuite/testsuite_iterators.h	(revision 108948)
+++ testsuite/testsuite_iterators.h	(working copy)
@@ -144,6 +144,7 @@
     {
       ptr = in.ptr;
       SharedInfo = in.SharedInfo;
+      return *this;
     }
 
     output_iterator_wrapper&
@@ -394,6 +395,7 @@
     {
       this->ptr = in.ptr;
       this->SharedInfo = in.SharedInfo;
+      return *this;
     }
 
     random_access_iterator_wrapper&
Index: testsuite/27_io/basic_streambuf/in_avail/wchar_t/1.cc
===================================================================
--- testsuite/27_io/basic_streambuf/in_avail/wchar_t/1.cc	(revision 108948)
+++ testsuite/27_io/basic_streambuf/in_avail/wchar_t/1.cc	(working copy)
@@ -39,7 +39,7 @@
   typedef size_t 			size_type;
 
   bool test __attribute__((unused)) = true;
-  std::streamoff  			strmof_1, strmof_2;
+  std::streamoff  			strmof_1;
   testbuf	sb01;
 
   // int in_avail()
Index: testsuite/27_io/basic_streambuf/in_avail/char/1.cc
===================================================================
--- testsuite/27_io/basic_streambuf/in_avail/char/1.cc	(revision 108948)
+++ testsuite/27_io/basic_streambuf/in_avail/char/1.cc	(working copy)
@@ -39,7 +39,7 @@
   typedef size_t 			size_type;
 
   bool test __attribute__((unused)) = true;
-  std::streamoff  			strmof_1, strmof_2;
+  std::streamoff  			strmof_1;
   testbuf	sb01;
 
   // int in_avail()
Index: testsuite/27_io/basic_ios/cons/char/3.cc
===================================================================
--- testsuite/27_io/basic_ios/cons/char/3.cc	(revision 108948)
+++ testsuite/27_io/basic_ios/cons/char/3.cc	(working copy)
@@ -100,11 +100,11 @@
       }
 
       static char_type 
-      to_char_type(const int_type& __c)
+      to_char_type(const int_type&)
       { return char_type(); }
 
       static int_type 
-      to_int_type(const char_type& __c) { return int_type(); }
+      to_int_type(const char_type&) { return int_type(); }
 
       static bool 
       eq_int_type(const int_type& __c1, const int_type& __c2)
Index: testsuite/27_io/basic_istream/ignore/wchar_t/2.cc
===================================================================
--- testsuite/27_io/basic_istream/ignore/wchar_t/2.cc	(revision 108948)
+++ testsuite/27_io/basic_istream/ignore/wchar_t/2.cc	(working copy)
@@ -51,7 +51,8 @@
   while (stream.ignore(numeric_limits<streamsize>::max(), delim).good())
     {
       index_new = str.find(delim, index);
-      VERIFY( stream.gcount() == index_new - index + 1 );
+      VERIFY( static_cast<string::size_type>(stream.gcount()) ==
+	      index_new - index + 1 );
       index = index_new + 1;
       ++n;
     }
Index: testsuite/27_io/basic_istream/ignore/char/2.cc
===================================================================
--- testsuite/27_io/basic_istream/ignore/char/2.cc	(revision 108948)
+++ testsuite/27_io/basic_istream/ignore/char/2.cc	(working copy)
@@ -49,7 +49,8 @@
   while (stream.ignore(numeric_limits<streamsize>::max(), delim).good())
     {
       index_new = str.find(delim, index);
-      VERIFY( stream.gcount() == index_new - index + 1 );
+      VERIFY( static_cast<string::size_type>(stream.gcount()) ==
+	      index_new - index + 1 );
       index = index_new + 1;
       ++n;
     }
Index: testsuite/27_io/basic_istream/getline/wchar_t/5.cc
===================================================================
--- testsuite/27_io/basic_istream/getline/wchar_t/5.cc	(revision 108948)
+++ testsuite/27_io/basic_istream/getline/wchar_t/5.cc	(working copy)
@@ -51,7 +51,8 @@
   while (stream.getline(buf, sizeof(buf) / sizeof(wchar_t), delim))
     {
       index_new = str.find(delim, index);
-      VERIFY( stream.gcount() == index_new - index + 1 );
+      VERIFY( static_cast<string::size_type>(stream.gcount()) ==
+	       index_new - index + 1 );
       VERIFY( !str.compare(index, index_new - index, buf) );
       index = index_new + 1;
       ++n;
Index: testsuite/27_io/basic_istream/getline/char/5.cc
===================================================================
--- testsuite/27_io/basic_istream/getline/char/5.cc	(revision 108948)
+++ testsuite/27_io/basic_istream/getline/char/5.cc	(working copy)
@@ -49,7 +49,8 @@
   while (stream.getline(buf, sizeof(buf), delim))
     {
       index_new = str.find(delim, index);
-      VERIFY( stream.gcount() == index_new - index + 1 );
+      VERIFY( static_cast<string::size_type>(stream.gcount()) ==
+	      index_new - index + 1 );
       VERIFY( !str.compare(index, index_new - index, buf) );
       index = index_new + 1;
       ++n;
Index: testsuite/27_io/basic_ostream/flush/wchar_t/1.cc
===================================================================
--- testsuite/27_io/basic_ostream/flush/wchar_t/1.cc	(revision 108948)
+++ testsuite/27_io/basic_ostream/flush/wchar_t/1.cc	(working copy)
@@ -26,7 +26,6 @@
 {
   bool test __attribute__((unused)) = true;
 
-  const wchar_t str_lit01[] = L"  venice ";
   const std::wstring str01(L" santa barbara ");
   std::wstring str04;
   std::wstring str05;
Index: testsuite/27_io/basic_ostream/flush/char/1.cc
===================================================================
--- testsuite/27_io/basic_ostream/flush/char/1.cc	(revision 108948)
+++ testsuite/27_io/basic_ostream/flush/char/1.cc	(working copy)
@@ -28,7 +28,6 @@
 {
   bool test __attribute__((unused)) = true;
 
-  const char str_lit01[] = "  venice ";
   const std::string str01(" santa barbara ");
   std::string str04;
   std::string str05;
Index: testsuite/27_io/basic_ostream/endl/wchar_t/1.cc
===================================================================
--- testsuite/27_io/basic_ostream/endl/wchar_t/1.cc	(revision 108948)
+++ testsuite/27_io/basic_ostream/endl/wchar_t/1.cc	(working copy)
@@ -26,7 +26,6 @@
 {
   bool test __attribute__((unused)) = true;
 
-  const wchar_t str_lit01[] = L"  venice ";
   const std::wstring str01(L" santa barbara ");
   std::wstring str04;
   std::wstring str05;
Index: testsuite/27_io/basic_ostream/endl/char/1.cc
===================================================================
--- testsuite/27_io/basic_ostream/endl/char/1.cc	(revision 108948)
+++ testsuite/27_io/basic_ostream/endl/char/1.cc	(working copy)
@@ -28,7 +28,6 @@
 {
   bool test __attribute__((unused)) = true;
 
-  const char str_lit01[] = "  venice ";
   const std::string str01(" santa barbara ");
   std::string str04;
   std::string str05;
Index: testsuite/27_io/basic_ostream/ends/wchar_t/1.cc
===================================================================
--- testsuite/27_io/basic_ostream/ends/wchar_t/1.cc	(revision 108948)
+++ testsuite/27_io/basic_ostream/ends/wchar_t/1.cc	(working copy)
@@ -26,7 +26,6 @@
 {
   bool test __attribute__((unused)) = true;
 
-  const wchar_t str_lit01[] = L"  venice ";
   const std::wstring str01(L" santa barbara ");
   std::wstring str04;
   std::wstring str05;
Index: testsuite/27_io/basic_ostream/ends/char/1.cc
===================================================================
--- testsuite/27_io/basic_ostream/ends/char/1.cc	(revision 108948)
+++ testsuite/27_io/basic_ostream/ends/char/1.cc	(working copy)
@@ -28,7 +28,6 @@
 {
   bool test __attribute__((unused)) = true;
 
-  const char str_lit01[] = "  venice ";
   const std::string str01(" santa barbara ");
   std::string str04;
   std::string str05;
Index: testsuite/27_io/basic_ostream/write/wchar_t/1.cc
===================================================================
--- testsuite/27_io/basic_ostream/write/wchar_t/1.cc	(revision 108948)
+++ testsuite/27_io/basic_ostream/write/wchar_t/1.cc	(working copy)
@@ -40,8 +40,8 @@
 
 void test01()
 {
-  bool test = true;
-
+  bool test __attribute__((unused)) = true;
+  
   Buf buf;
   std::wostream os(&buf);
 
Index: testsuite/27_io/basic_ostream/write/char/1.cc
===================================================================
--- testsuite/27_io/basic_ostream/write/char/1.cc	(revision 108948)
+++ testsuite/27_io/basic_ostream/write/char/1.cc	(working copy)
@@ -42,8 +42,8 @@
 
 void test01()
 {
-  bool test = true;
-
+  bool test __attribute__((unused)) = true;
+  
   Buf buf;
   std::ostream os(&buf);
 
Index: testsuite/27_io/basic_filebuf/imbue/12206.cc
===================================================================
--- testsuite/27_io/basic_filebuf/imbue/12206.cc	(revision 108948)
+++ testsuite/27_io/basic_filebuf/imbue/12206.cc	(working copy)
@@ -65,21 +65,21 @@
     static locale::id id;
     
   protected:
-    virtual result do_out(mbstate_t&, const Char* from,
-			  const Char* from_end,
-			  const Char*& from_next, char* to,
-			  char* to_limit, char*& to_next) const
+    virtual result do_out(mbstate_t&, const Char*,
+			  const Char*,
+			  const Char*&, char*,
+			  char*, char*&) const
     { return ok; }
-    virtual result do_in(mbstate_t&, const char* from,
-			 const char* from_end,
-			 const char*& from_next, Char* to,
-			 Char* to_limit, Char*& to_next) const
+    virtual result do_in(mbstate_t&, const char*,
+			 const char*,
+			 const char*&, Char*,
+			 Char*, Char*&) const
     { return ok; }
-    virtual result do_unshift(mbstate_t&, char* to, char*,
-			      char*& to_next) const
+    virtual result do_unshift(mbstate_t&, char*, char*,
+			      char*&) const
     { return noconv; }
-    virtual int do_length(mbstate_t&, const char* from,
-			  const char* from_end, size_t max) const
+    virtual int do_length(mbstate_t&, const char*,
+			  const char*, size_t) const
     { return 1; }
     virtual int do_encoding() const throw()
     { return 1; }
Index: testsuite/27_io/basic_filebuf/close/char/2.cc
===================================================================
--- testsuite/27_io/basic_filebuf/close/char/2.cc	(revision 108948)
+++ testsuite/27_io/basic_filebuf/close/char/2.cc	(working copy)
@@ -43,7 +43,7 @@
 void test_02()
 {
   bool test __attribute__((unused)) = true;
-  int close_num;
+  int close_num = 0;
 
   // read (ext)
   FILE* f2 = fopen(name_01, "r");
Index: testsuite/21_strings/basic_string/capacity/1.cc
===================================================================
--- testsuite/21_strings/basic_string/capacity/1.cc	(revision 108948)
+++ testsuite/21_strings/basic_string/capacity/1.cc	(working copy)
@@ -28,11 +28,11 @@
 
 template<typename T>
   bool
-  operator==(const A<T>& a, const A<T>& b) { return true; }
+  operator==(const A<T>&, const A<T>&) { return true; }
 
 template<typename T>
   bool
-  operator<(const A<T>& a, const A<T>& b) { return true; }
+  operator<(const A<T>&, const A<T>&) { return true; }
 
 struct B { };
 
@@ -104,11 +104,11 @@
       }
 
       static char_type 
-      to_char_type(const int_type& __c)
+      to_char_type(const int_type&)
       { return char_type(); }
 
       static int_type 
-      to_int_type(const char_type& __c) { return int_type(); }
+      to_int_type(const char_type&) { return int_type(); }
 
       static bool 
       eq_int_type(const int_type& __c1, const int_type& __c2)
Index: testsuite/testsuite_character.h
===================================================================
--- testsuite/testsuite_character.h	(revision 108948)
+++ testsuite/testsuite_character.h	(working copy)
@@ -323,7 +323,7 @@
       { }
 
       virtual bool
-      do_is(mask m, char_type c) const
+      do_is(mask, char_type) const
       { return false; }
 
       virtual const char_type*
@@ -334,11 +334,11 @@
       }
 
       virtual const char_type*
-      do_scan_is(mask m, const char_type* low, const char_type* high) const
+      do_scan_is(mask, const char_type*, const char_type* high) const
       { return high; }
 
       virtual const char_type*
-      do_scan_not(mask m, const char_type* low, const char_type* high) const
+      do_scan_not(mask, const char_type* low, const char_type*) const
       { return low; }
 
       virtual char_type
@@ -346,7 +346,7 @@
       { return c; }
 
       virtual const char_type*
-      do_toupper(char_type*  low, const char_type*  high) const
+      do_toupper(char_type*, const char_type*  high) const
       { return high; }
 
       virtual char_type
@@ -354,7 +354,7 @@
       { return c; }
 
       virtual const char_type*
-      do_tolower(char_type*  low, const char_type*  high) const
+      do_tolower(char_type*, const char_type*  high) const
       { return high; }
 
       virtual char_type
Index: testsuite/26_numerics/valarray/valarray_subset_assignment.cc
===================================================================
--- testsuite/26_numerics/valarray/valarray_subset_assignment.cc	(revision 108948)
+++ testsuite/26_numerics/valarray/valarray_subset_assignment.cc	(working copy)
@@ -35,14 +35,13 @@
 
 bool check_array(std::valarray<double>& a, double b[])
 {
-  for (int i=0; i < a.size(); i++)
+  for (unsigned int i=0; i < a.size(); i++)
     if (a[i] != b[i]) return false;
   return true;
 }
 
 int main()
 {
-  double dvar = 1.0;
   std::valarray<double> val_d(10);  //  0 1 2 3 4 5 6 7 8 9 
   std::valarray<double> val_d1(10); // 10 9 8 7 6 5 4 3 2 1
 
Index: testsuite/20_util/functional/binders/1.cc
===================================================================
--- testsuite/20_util/functional/binders/1.cc	(revision 108948)
+++ testsuite/20_util/functional/binders/1.cc	(working copy)
@@ -27,12 +27,12 @@
 {
   void f_void_int_const(int) const {}
   void f_void_int(int) {}
-  int f_int_int_const(int) const {}
-  int f_int_int(int) {}
+  int f_int_int_const(int) const { return 1; }
+  int f_int_int(int) {return 1; }
   void f_void_void_const() const {}
   void f_void_void() {}
-  int f_int_void_const() const {}
-  int f_int_void() {}
+  int f_int_void_const() const { return 1; }
+  int f_int_void() { return 1; }
 };
 
 void test01(s& a)

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