From 22352844c944c3d4fb2e70854484d346fffa9733 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Fri, 23 Jan 2004 16:51:24 +0000 Subject: [PATCH] re PR libstdc++/13831 (Unused variable in basic_filebuf::underflow) 2004-01-23 Paolo Carlini PR libstdc++/13831 * include/bits/fstream.tcc (underflow): Remove unused variable. * include/bits/streambuf_iterator.h (equal): Ditto. * include/bits/locale_facets.h (_M_convert_from_char): Ditto. From-SVN: r76433 --- libstdc++-v3/ChangeLog | 9 +++++++++ libstdc++-v3/include/bits/fstream.tcc | 1 - libstdc++-v3/include/bits/locale_facets.h | 5 +++-- libstdc++-v3/include/bits/streambuf_iterator.h | 5 ++--- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index a2e6307aec1..7ef928c0249 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,12 @@ +2004-01-23 Paolo Carlini + + PR libstdc++/13831 + * include/bits/fstream.tcc (underflow): Remove unused + variable. + * include/bits/streambuf_iterator.h (equal): Ditto. + * include/bits/locale_facets.h (_M_convert_from_char): + Ditto. + 2004-01-23 Kaveh R. Ghazi PR c/13814 diff --git a/libstdc++-v3/include/bits/fstream.tcc b/libstdc++-v3/include/bits/fstream.tcc index ed2fb6aace9..de6379b8863 100644 --- a/libstdc++-v3/include/bits/fstream.tcc +++ b/libstdc++-v3/include/bits/fstream.tcc @@ -179,7 +179,6 @@ namespace std { int_type __ret = traits_type::eof(); const bool __testin = this->_M_mode & ios_base::in; - const bool __testout = this->_M_mode & ios_base::out; if (__testin && !_M_writing) { // Check for pback madness, and if so swich back to the diff --git a/libstdc++-v3/include/bits/locale_facets.h b/libstdc++-v3/include/bits/locale_facets.h index 05003ed28d5..6f212fe08ae 100644 --- a/libstdc++-v3/include/bits/locale_facets.h +++ b/libstdc++-v3/include/bits/locale_facets.h @@ -4384,14 +4384,15 @@ namespace std // Returns a locale and codeset-converted string, given a char* message. string_type - _M_convert_from_char(char* __msg) const + _M_convert_from_char(char*) const { +#if 0 // Length of message string without terminating null. size_t __len = char_traits::length(__msg) - 1; // "everybody can easily convert the string using // mbsrtowcs/wcsrtombs or with iconv()" -#if 0 + // Convert char* to _CharT in locale used to open catalog. // XXX need additional template parameter on messages class for this.. // typedef typename codecvt __codecvt_type; diff --git a/libstdc++-v3/include/bits/streambuf_iterator.h b/libstdc++-v3/include/bits/streambuf_iterator.h index 3c393e3f955..027cc891d99 100644 --- a/libstdc++-v3/include/bits/streambuf_iterator.h +++ b/libstdc++-v3/include/bits/streambuf_iterator.h @@ -132,9 +132,8 @@ namespace std bool equal(const istreambuf_iterator& __b) const { - const int_type __eof = traits_type::eof(); - bool __thiseof = _M_at_eof(); - bool __beof = __b._M_at_eof(); + const bool __thiseof = _M_at_eof(); + const bool __beof = __b._M_at_eof(); return (__thiseof && __beof || (!__thiseof && !__beof)); }