summaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/std/streambuf
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2017-12-04 23:07:39 +0000
committerJonathan Wakely <redi@gcc.gnu.org>2017-12-04 23:07:39 +0000
commit9ed83a33c0a826cb190f60552d930c38a80ad46c (patch)
tree38749e6f057aae922c87ae9953be1664a004191e /libstdc++-v3/include/std/streambuf
parent899ac3b80040d7879082b5df11675cea88a43756 (diff)
Fix -Wunused warnings in libstdc++ headers
* config/io/basic_file_stdio.h (__basic_file): Remove name of unused parameter. * include/bits/boost_concept_check.h: Add pragmas to disable -Wunused-local-typedef warnings. * include/bits/codecvt.h (codecvt_byname<char16_t, char, mbstate_t>) (codecvt_byname<char32_t, char, mbstate_t>): Remove name of unused parameter. * include/bits/locale_facets_nonio.tcc (time_get::do_get_weekday) (time_get::do_get_monthname, time_get::do_get_year): Remove unused variables. * include/std/bitset (_Base_bitset<0>::_M_getword): Remove name of unused parameter. * include/std/streambuf (_IsUnused): Define. (basic_streambuf::imbue, basic_streambuf::pbackfail) (basic_streambuf::overflow): Add macro to unused parameters. * testsuite/24_iterators/operations/prev_neg.cc: Adjust dg-error. From-SVN: r255391
Diffstat (limited to 'libstdc++-v3/include/std/streambuf')
-rw-r--r--libstdc++-v3/include/std/streambuf10
1 files changed, 7 insertions, 3 deletions
diff --git a/libstdc++-v3/include/std/streambuf b/libstdc++-v3/include/std/streambuf
index c1fd395b827..34fa9a45511 100644
--- a/libstdc++-v3/include/std/streambuf
+++ b/libstdc++-v3/include/std/streambuf
@@ -46,6 +46,8 @@ namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
+#define _IsUnused __attribute__ ((__unused__))
+
template<typename _CharT, typename _Traits>
streamsize
__copy_streambufs_eof(basic_streambuf<_CharT, _Traits>*,
@@ -578,7 +580,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* @note Base class version does nothing.
*/
virtual void
- imbue(const locale& __loc)
+ imbue(const locale& __loc _IsUnused)
{ }
// [27.5.2.4.2] buffer management and positioning
@@ -726,7 +728,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* @note Base class version does nothing, returns eof().
*/
virtual int_type
- pbackfail(int_type __c = traits_type::eof())
+ pbackfail(int_type __c _IsUnused = traits_type::eof())
{ return traits_type::eof(); }
// Put area:
@@ -770,7 +772,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* @note Base class version does nothing, returns eof().
*/
virtual int_type
- overflow(int_type __c = traits_type::eof())
+ overflow(int_type __c _IsUnused = traits_type::eof())
{ return traits_type::eof(); }
#if _GLIBCXX_USE_DEPRECATED && __cplusplus <= 201402L
@@ -852,6 +854,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
basic_streambuf<wchar_t>* __sbout, bool& __ineof);
#endif
+#undef _IsUnused
+
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace