This is the mail archive of the libstdc++@sourceware.cygnus.com 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]

patch: -Wall and unused variables


Here are some really boring changes to silence most of the `gcc -Wall'
warnings.

1999-08-10  Michael Cook  <cook@sightpath.com>

	* bits/fstream.tcc: Fix for unused variable warning (-Wall).
	* bits/ios_base.h: ditto.
	* bits/istream.tcc: ditto.
	* bits/locale_facets.h: ditto.
	* bits/locale_facets.tcc: ditto.
	* bits/std_streambuf.h: ditto.
	* src/basic_file.cc: ditto.
	* src/locale.cc: ditto.
	* src/localename.cc: ditto.

Index: ./bits/fstream.tcc
===================================================================
RCS file: /cvs/libstdc++/libstdc++/bits/fstream.tcc,v
retrieving revision 1.27
diff -u -r1.27 fstream.tcc
--- fstream.tcc	1999/07/24 07:13:42	1.27
+++ fstream.tcc	1999/08/11 00:37:45
@@ -63,7 +63,7 @@
 
   template<typename _CharT, typename _Traits>
     basic_filebuf<_CharT, _Traits>::
-    basic_filebuf(int __fd, const char* __name, ios_base::openmode __mode)
+    basic_filebuf(int __fd, const char* /*__name*/, ios_base::openmode __mode)
     : __streambuf_type(), _M_last_overflowed(false),
     _M_state_cur(), _M_state_beg()
     {
Index: ./bits/ios_base.h
===================================================================
RCS file: /cvs/libstdc++/libstdc++/bits/ios_base.h,v
retrieving revision 1.25
diff -u -r1.25 ios_base.h
--- ios_base.h	1999/07/24 07:13:42	1.25
+++ ios_base.h	1999/08/11 00:37:45
@@ -372,7 +372,7 @@
     register_callback(event_callback __fn, int __index);
 
     static bool 
-    sync_with_stdio(bool __sync = true)
+    sync_with_stdio(bool /*__sync*/ = true)
     { 
       // XXX Not done: 
       // Otherwise, called with __sync == false, allows the standard
Index: ./bits/istream.tcc
===================================================================
RCS file: /cvs/libstdc++/libstdc++/bits/istream.tcc,v
retrieving revision 1.13
diff -u -r1.13 istream.tcc
--- istream.tcc	1999/07/29 09:20:53	1.13
+++ istream.tcc	1999/08/11 00:37:46
@@ -548,7 +548,6 @@
       if (__cerb) 
 	{
 	  __str.erase();
-	  streamsize __w = __is.width();
 	  __size_type __n = __str.max_size();
 	  __int_type __eof = _Traits::eof();
 	  __int_type __idelim = _Traits::to_int_type(__delim);
Index: ./bits/locale_facets.h
===================================================================
RCS file: /cvs/libstdc++/libstdc++/bits/locale_facets.h,v
retrieving revision 1.3
diff -u -r1.3 locale_facets.h
--- locale_facets.h	1999/06/25 03:55:30	1.3
+++ locale_facets.h	1999/08/11 00:37:47
@@ -1441,13 +1441,13 @@
       { return time_base::ymd; }
 
       virtual iter_type 
-      do_get_time(iter_type __s, iter_type __end, ios_base&,
-		  ios_base::iostate& __err, tm* __t) const
+      do_get_time(iter_type __s, iter_type /*__end*/, ios_base&,
+		  ios_base::iostate& /*__err*/, tm* /*__t*/) const
       { return __s; }
 
       virtual iter_type 
-      do_get_date(iter_type __s, iter_type __end, ios_base&,
-		  ios_base::iostate& __err, tm* __t) const
+      do_get_date(iter_type __s, iter_type /*__end*/, ios_base&,
+		  ios_base::iostate& /*__err*/, tm* /*__t*/) const
       { return __s; }
 
       virtual iter_type 
@@ -1459,8 +1459,8 @@
 		       ios_base::iostate& __err, tm* __t) const;
 
       virtual iter_type 
-      do_get_year(iter_type __s, iter_type __end, ios_base&,
-		   ios_base::iostate& __err, tm* __t) const
+      do_get_year(iter_type __s, iter_type /*__end*/, ios_base&,
+		   ios_base::iostate& /*__err*/, tm* /*__t*/) const
       { return __s; }
 
       mutable basic_string<_CharT>* _M_daynames;
@@ -1494,8 +1494,9 @@
 
       // NB: this is a nonvirtual, calls do_put in a loop.
       iter_type 
-      put(iter_type __s, ios_base& __f, char_type __fill, const tm* __tmb,
-	  const _CharT* __pattern, const _CharT* __pat_end) const
+      put(iter_type __s, ios_base& /*__f*/, char_type /*__fill*/,
+          const tm* /*__tmb*/, const _CharT* /*__pattern*/,
+          const _CharT* /*__pat_end*/) const
       { return __s; }
 
       iter_type 
@@ -1510,8 +1511,8 @@
       ~time_put() { }
 
       virtual iter_type 
-      do_put(iter_type __s, ios_base&, char_type, const tm* __t, 
-	     char __format, char __mod) const
+      do_put(iter_type __s, ios_base&, char_type, const tm* /*__t*/, 
+	     char /*__format*/, char /*__mod*/) const
       { return __s; }
     };
 
@@ -1557,13 +1558,15 @@
       ~money_get() { }
 
       virtual iter_type 
-      do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
-	     ios_base::iostate& __err, long double& __units) const
+      do_get(iter_type __s, iter_type /*__end*/, bool /*__intl*/,
+             ios_base& /*__io*/, ios_base::iostate& /*__err*/,
+             long double& /*__units*/) const
       { return __s; }
 
       virtual iter_type 
-      do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
-	     ios_base::iostate& __err, string_type& __digits) const
+      do_get(iter_type __s, iter_type /*__end*/, bool /*__intl*/,
+             ios_base& /*__io*/, ios_base::iostate& /*__err*/,
+             string_type& /*__digits*/) const
       { return __s; }
     };
 
@@ -1595,13 +1598,13 @@
       ~money_put() { }
 
       virtual iter_type
-      do_put(iter_type __s, bool, ios_base& __io, char_type __fill,
-	     long double __units) const
+      do_put(iter_type __s, bool, ios_base& /*__io*/, char_type /*__fill*/,
+	     long double /*__units*/) const
       { return __s; }
 
       virtual iter_type
-      do_put(iter_type __s, bool, ios_base& __io, char_type __fill,
-	     const string_type& __digits) const
+      do_put(iter_type __s, bool, ios_base& /*__io*/, char_type /*__fill*/,
+	     const string_type& /*__digits*/) const
       { return __s; }
     };
 
@@ -1768,7 +1771,7 @@
       { return 0; }
 
       virtual string_type  
-      do_get(catalog, int, int __msgid, const string_type& __dfault) const
+      do_get(catalog, int, int /*__msgid*/, const string_type& __dfault) const
       { return __dfault; }
 
       virtual void    
Index: ./bits/locale_facets.tcc
===================================================================
RCS file: /cvs/libstdc++/libstdc++/bits/locale_facets.tcc,v
retrieving revision 1.8
diff -u -r1.8 locale_facets.tcc
--- locale_facets.tcc	1999/07/19 03:55:40	1.8
+++ locale_facets.tcc	1999/08/11 00:37:47
@@ -276,8 +276,9 @@
   template<typename _CharT, typename _InIter>
     void
     num_get<_CharT, _InIter>::    
-    _M_extract(iter_type __beg, iter_type __end, ios_base& __io, 
-	       ios_base::iostate& __err, char* __xtrc, int& __base) const
+    _M_extract(iter_type /*__beg*/, iter_type /*__end*/, ios_base& /*__io*/, 
+	       ios_base::iostate& /*__err*/, char* /*__xtrc*/,
+               int& /*__base*/) const
     {
       // XXX Not currently done: need to expand upon char version below.
     }
@@ -366,7 +367,6 @@
 	  __fcache_type* __fmt = __fcache_type::_S_get(__io);
 	  const char_type* __true = __fmt->_M_truename.c_str();
 	  const char_type* __false = __fmt->_M_falsename.c_str();
-	  int __name_len = max(sizeof(__false), sizeof(__true));
 	  char_type __itrue[sizeof(__true)]; 
 	  char_type __ifalse[sizeof(__false)];
 
@@ -1008,7 +1008,8 @@
   template <typename _CharT, typename _OutIter>
     _OutIter 
     num_put<_CharT, _OutIter>::
-    do_put(iter_type __s, ios_base& __io, char_type __fill, double __v) const
+    do_put(iter_type __s, ios_base& /*__io*/, char_type /*__fill*/,
+           double /*__v*/) const
     {
       return __s;  // XXX not done
     }
@@ -1016,8 +1017,8 @@
   template <typename _CharT, typename _OutIter>
     _OutIter 
     num_put<_CharT, _OutIter>::
-    do_put(iter_type __s, ios_base& __io, char_type __fill,
-	   long double __v) const
+    do_put(iter_type __s, ios_base& /*__io*/, char_type /*__fill*/,
+	   long double /*__v*/) const
     {
       return __s;  // XXX not done
     }
Index: ./bits/std_streambuf.h
===================================================================
RCS file: /cvs/libstdc++/libstdc++/bits/std_streambuf.h,v
retrieving revision 1.47
diff -u -r1.47 std_streambuf.h
--- std_streambuf.h	1999/08/10 22:47:49	1.47
+++ std_streambuf.h	1999/08/11 00:37:48
@@ -271,12 +271,12 @@
       
       virtual pos_type 
       seekoff(off_type, ios_base::seekdir,
-	      ios_base::openmode __mode = ios_base::in | ios_base::out)
+	      ios_base::openmode /*__mode*/ = ios_base::in | ios_base::out)
       { return pos_type(off_type(-1)); } 
 
       virtual pos_type 
       seekpos(pos_type, 
-	      ios_base::openmode __mode = ios_base::in | ios_base::out)
+	      ios_base::openmode /*__mode*/ = ios_base::in | ios_base::out)
       { return pos_type(off_type(-1)); } 
 
       virtual int 
Index: ./src/basic_file.cc
===================================================================
RCS file: /cvs/libstdc++/libstdc++/src/basic_file.cc,v
retrieving revision 1.17
diff -u -r1.17 basic_file.cc
--- basic_file.cc	1999/07/09 02:58:51	1.17
+++ basic_file.cc	1999/08/11 00:37:48
@@ -98,7 +98,7 @@
 		     int __prot = 0664)
   {
     __basic_file* __retval = NULL;
-    bool __testb = __mode & ios_base::binary;
+    //bool __testb = __mode & ios_base::binary;
     bool __testi = __mode & ios_base::in;
     bool __testo = __mode & ios_base::out;
     bool __testt = __mode & ios_base::trunc;
@@ -235,7 +235,7 @@
   __basic_file::showmanyc() { return -1; }
 
   void 
-  __basic_file::imbue(void* __v) { }
+  __basic_file::imbue(void* /*__v*/) { }
 
 }  // namespace std
 
Index: ./src/locale.cc
===================================================================
RCS file: /cvs/libstdc++/libstdc++/src/locale.cc,v
retrieving revision 1.28
diff -u -r1.28 locale.cc
--- locale.cc	1999/07/28 08:55:48	1.28
+++ locale.cc	1999/08/11 00:37:48
@@ -519,14 +519,14 @@
   }
   
   char
-  ctype<char>::do_narrow(char __c, char __dfault) const
+  ctype<char>::do_narrow(char __c, char /*__dfault*/) const
   {
     return __c;
   }
   
   const char* 
   ctype<char>::
-  do_narrow(const char* __low, const char* __high, char __dfault,
+  do_narrow(const char* __low, const char* __high, char /*__dfault*/,
 	    char* __dest) const
   {
     memcpy(__dest, __low, __high - __low);
@@ -534,7 +534,7 @@
   }
 
   template<>
-    ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
+    ctype_byname<char>::ctype_byname(const char* /*__s*/, size_t __refs)
     : ctype<char> (new mask[table_size], true, __refs)
     { }
   
@@ -549,7 +549,7 @@
   
   codecvt_base::result
   codecvt<char, char, mbstate_t>::
-  do_out(state_type& __state, const intern_type* __from, 
+  do_out(state_type& /*__state*/, const intern_type* __from, 
 	 const intern_type* __from_end, const intern_type*& __from_next,
 	 extern_type* __to, extern_type* __to_end, 
 	 extern_type*& __to_next) const
@@ -565,7 +565,8 @@
   
   codecvt_base::result
   codecvt<char, char, mbstate_t>::
-  do_unshift(state_type& __state, extern_type* __to, extern_type* __to_limit,
+  do_unshift(state_type& /*__state*/, extern_type* __to,
+             extern_type* /*__to_limit*/,
 	     extern_type*& __to_next) const
   { 
     __to_next = __to; 
@@ -574,7 +575,7 @@
   
   codecvt_base::result
   codecvt<char, char, mbstate_t>::
-  do_in(state_type& __state, const extern_type* __from, 
+  do_in(state_type& /*__state*/, const extern_type* __from, 
 	const extern_type* __from_end, const extern_type*& __from_next,
 	intern_type* __to, intern_type* __to_end, 
 	intern_type*& __to_next) const
@@ -599,7 +600,7 @@
   
   int 
   codecvt<char, char, mbstate_t>::
-  do_length (const state_type& __state, const extern_type* __from,
+  do_length (const state_type& /*__state*/, const extern_type* __from,
 	     const extern_type* __end, size_t __max) const
   { return (__max < size_t(__end - __from)) ? __max : __end - __from; }
   
@@ -608,7 +609,7 @@
   { return 1; }
   
   codecvt_byname<char, char, mbstate_t>::
-  codecvt_byname(const char* __s, size_t __refs)
+  codecvt_byname(const char* /*__s*/, size_t __refs)
   : codecvt<char, char, mbstate_t>(__refs)
   { }
 
@@ -654,30 +655,30 @@
   }
   
   template<>
-    collate_byname<char>::collate_byname(const char* __s, size_t __refs)
+    collate_byname<char>::collate_byname(const char* /*__s*/, size_t __refs)
     : collate<char> (__refs)
     { }
 
   template<>
-    numpunct_byname<char>::numpunct_byname(const char* __s, size_t __refs)
+    numpunct_byname<char>::numpunct_byname(const char* /*__s*/, size_t __refs)
     : numpunct<char> (__refs)
     { }
 
 
   template<>
     moneypunct_byname<char, false>::
-    moneypunct_byname(const char* __s, size_t __refs)
+    moneypunct_byname(const char* /*__s*/, size_t __refs)
     : moneypunct<char, false> (__refs)
     { }
   
   template<>
     moneypunct_byname<char, true>::
-    moneypunct_byname(const char* __s, size_t __refs)
+    moneypunct_byname(const char* /*__s*/, size_t __refs)
     : moneypunct<char, true> (__refs)
     { }
   
   template<>
-    messages_byname<char>::messages_byname(const char* __s, size_t __refs)
+    messages_byname<char>::messages_byname(const char* /*__s*/, size_t __refs)
     : messages<char> (__refs)
     { }
 
@@ -798,7 +799,7 @@
   }
 
   template<>
-    ctype_byname<wchar_t>::ctype_byname(const char* __s, size_t __refs)
+    ctype_byname<wchar_t>::ctype_byname(const char* /*__s*/, size_t __refs)
     : ctype<wchar_t> (__refs)
     { }
 
@@ -812,7 +813,7 @@
   
   codecvt_base::result
   codecvt<wchar_t, char, mbstate_t>::
-  do_out(state_type& __state, const intern_type* __from, 
+  do_out(state_type& /*__state*/, const intern_type* __from, 
 	 const intern_type* __from_end, const intern_type*& __from_next,
 	 extern_type* __to, extern_type* __to_limit,
 	 extern_type*& __to_next) const
@@ -825,7 +826,8 @@
   
   codecvt_base::result
   codecvt<wchar_t, char, mbstate_t>::
-  do_unshift (state_type& __state, extern_type* __to, extern_type* __to_limit,
+  do_unshift (state_type& /*__state*/, extern_type* __to,
+              extern_type* /*__to_limit*/,
 	      extern_type*& __to_next) const
   {
     __to_next = __to;
@@ -834,7 +836,7 @@
   
   codecvt_base::result
   codecvt<wchar_t, char, mbstate_t>::
-  do_in (state_type& __state, const extern_type* __from, 
+  do_in (state_type& /*__state*/, const extern_type* __from, 
 	 const extern_type* __from_end, const extern_type*& __from_next,
 	 intern_type* __to, intern_type* __to_limit,
 	 intern_type*& __to_next) const
@@ -855,7 +857,7 @@
   
   int 
   codecvt<wchar_t, char, mbstate_t>::
-  do_length(const state_type& __state, const extern_type* __from,
+  do_length(const state_type& /*__state*/, const extern_type* __from,
 	    const extern_type* __end, size_t __max) const
   { return (__max < size_t(__end - __from)) ? __max : __end - __from; }
   
@@ -864,7 +866,7 @@
   { return 1; }
 
   codecvt_byname<wchar_t, char, mbstate_t>::
-  codecvt_byname(const char* __s, size_t __refs)
+  codecvt_byname(const char* /*__s*/, size_t __refs)
   : codecvt<wchar_t, char, mbstate_t> (__refs)
   {
   }
@@ -880,48 +882,50 @@
   collate<wchar_t>::~collate() { }
 
   int collate<wchar_t>::
-  do_compare(const wchar_t* __lo1, const wchar_t* __hi1,
-	     const wchar_t* __lo2, const wchar_t* __hi2) const
+  do_compare(const wchar_t* /*__lo1*/, const wchar_t* /*__hi1*/,
+	     const wchar_t* /*__lo2*/, const wchar_t* /*__hi2*/) const
   {
     return 0; // XXX not done
   }
   
-  wstring collate<wchar_t>::do_transform(const wchar_t* __lo, 
-					 const wchar_t* __hi) const
+  wstring collate<wchar_t>::do_transform(const wchar_t* /*__lo*/, 
+					 const wchar_t* /*__hi*/) const
   {
     return wstring(); // XXX not done
   }
   
   long collate<wchar_t>::
-  do_hash(const wchar_t* __lo, const wchar_t* __hi) const
+  do_hash(const wchar_t* /*__lo*/, const wchar_t* /*__hi*/) const
   {
     return 0; // XXX not done
   }
 
   template<>
-    numpunct_byname<wchar_t>::numpunct_byname(const char* __s, size_t __refs)
+    numpunct_byname<wchar_t>::numpunct_byname(const char* /*__s*/,
+                                              size_t __refs)
     : numpunct<wchar_t> (__refs)
     { }
 
   template<>
-    collate_byname<wchar_t>::collate_byname(const char* __s, size_t __refs)
+    collate_byname<wchar_t>::collate_byname(const char* /*__s*/, size_t __refs)
     : collate<wchar_t> (__refs)
     { }
   
   template<>
     moneypunct_byname<wchar_t, false>::
-    moneypunct_byname(const char* __s, size_t __refs)
+    moneypunct_byname(const char* /*__s*/, size_t __refs)
     : moneypunct<wchar_t, false> (__refs)
     { }
   
   template<>
     moneypunct_byname<wchar_t, true>::
-    moneypunct_byname(const char* __s, size_t __refs)
+    moneypunct_byname(const char* /*__s*/, size_t __refs)
     : moneypunct<wchar_t, true> (__refs)
     { }
     
   template<>
-    messages_byname<wchar_t>::messages_byname(const char* __s, size_t __refs)
+    messages_byname<wchar_t>::messages_byname(const char* /*__s*/,
+                                              size_t __refs)
     : messages<wchar_t> (__refs)
     { }
 #endif //  _GLIBCPP_USE_WCHAR_T
Index: ./src/localename.cc
===================================================================
RCS file: /cvs/libstdc++/libstdc++/src/localename.cc,v
retrieving revision 1.6
diff -u -r1.6 localename.cc
--- localename.cc	1999/02/25 11:20:27	1.6
+++ localename.cc	1999/08/11 00:37:48
@@ -146,7 +146,7 @@
   }
 
   //////////
-  void locale::_Impl::_M_construct_collate (const char* name)
+  void locale::_Impl::_M_construct_collate (const char* /*name*/)
   {
 #if 0
     _M_init_facet (new std::collate_byname<char>(name));
@@ -154,7 +154,7 @@
 #endif
   }
 
-  void locale::_Impl::_M_construct_ctype (const char* name)
+  void locale::_Impl::_M_construct_ctype (const char* /*name*/)
   {
 #if 0
     _M_init_facet (new std::ctype_byname<char>(name));
@@ -164,7 +164,7 @@
 #endif
   }
     
-  void locale::_Impl::_M_construct_monetary (const char* name)
+  void locale::_Impl::_M_construct_monetary (const char* /*name*/)
   {
 #if 0
     _M_init_facet (new std::moneypunct_byname<char,false>(name));
@@ -180,7 +180,7 @@
 #endif
   }
     
-  void locale::_Impl::_M_construct_numeric (const char* name)
+  void locale::_Impl::_M_construct_numeric (const char* /*name*/)
   {
 #if 0
     _M_init_facet (new std::numpunct_byname<char>(name));
@@ -194,7 +194,7 @@
 #endif
   }
     
-  void locale::_Impl::_M_construct_time (const char* name)
+  void locale::_Impl::_M_construct_time (const char* /*name*/)
   {
 #if 0
     _M_init_facet (new std::time_get_byname<char>(name));
@@ -204,7 +204,7 @@
 #endif
   }
     
-  void locale::_Impl::_M_construct_messages (const char* name)
+  void locale::_Impl::_M_construct_messages (const char* /*name*/)
   {
 #if 0
     _M_init_facet (new std::messages_byname<char>(name));

Michael.

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