diff options
author | bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-09-23 20:03:30 +0000 |
---|---|---|
committer | bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-09-23 20:03:30 +0000 |
commit | f8ef786cfd35341f4c3d1742375e22f829a0876f (patch) | |
tree | 743380001d2341c199e3740ca7296f1783cef17c /libstdc++-v3 | |
parent | 33020648811e6f8f2313712ecb0e7ba99e2653b7 (diff) | |
download | gcc-f8ef786cfd35341f4c3d1742375e22f829a0876f.tar.gz |
2003-09-23 Benjamin Kosnik <bkoz@redhat.com>
* include/bits/locale_facets.tcc: Tweak to avoid warnings.
* testsuite/testsuite_hooks.h: Same.
* testsuite/*/*.cc: Same.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71693 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
795 files changed, 1309 insertions, 2296 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 9caf65ac7e1..224cc60d3a3 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2003-09-23 Benjamin Kosnik <bkoz@redhat.com> + + * include/bits/locale_facets.tcc: Tweak to avoid warnings. + * testsuite/testsuite_hooks.h: Same. + * testsuite/*/*.cc: Same. + 2003-09-22 Petur Runolfsson <peturr02@ru.is> * include/bits/istream.tcc (basic_istream::read, diff --git a/libstdc++-v3/include/bits/locale_facets.tcc b/libstdc++-v3/include/bits/locale_facets.tcc index e76ac84ea71..f0e41123e77 100644 --- a/libstdc++-v3/include/bits/locale_facets.tcc +++ b/libstdc++-v3/include/bits/locale_facets.tcc @@ -105,7 +105,7 @@ namespace std const locale::facet** __caches = __loc._M_impl->_M_caches; if (!__caches[__i]) { - __numpunct_cache<_CharT>* __tmp; + __numpunct_cache<_CharT>* __tmp = NULL; try { __tmp = new __numpunct_cache<_CharT>; diff --git a/libstdc++-v3/testsuite/17_intro/header_cerrno.cc b/libstdc++-v3/testsuite/17_intro/header_cerrno.cc index bfd869e8685..a8d19cf722b 100644 --- a/libstdc++-v3/testsuite/17_intro/header_cerrno.cc +++ b/libstdc++-v3/testsuite/17_intro/header_cerrno.cc @@ -1,6 +1,6 @@ // 2001-02-06 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001 Free Software Foundation, Inc. +// Copyright (C) 2001, 2003 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -24,12 +24,13 @@ namespace gnu { - void test01() + int test01() { int i = errno; #ifndef errno #error "errno_must_be_a_macro" #endif + return i; } } diff --git a/libstdc++-v3/testsuite/17_intro/header_ciso646.cc b/libstdc++-v3/testsuite/17_intro/header_ciso646.cc deleted file mode 100644 index 35b1ceef32d..00000000000 --- a/libstdc++-v3/testsuite/17_intro/header_ciso646.cc +++ /dev/null @@ -1,119 +0,0 @@ -// 1999-05-20 bkoz - -// Copyright (C) 1999, 2003 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 2, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -// USA. - -// 17.4.1.2 Headers, ciso646 - -// { dg-do link } - -#include <ciso646> -#include <testsuite_hooks.h> - - -// 2.11 Keywords -// alternative representations -// and, and_eq, bitand, bitor, compl, not, not_eq, or, or_eq, xor, xor_eq - -// C 2.2.2 Header <iso646.h> -// The tokens (as above) are keywords and do not appear as macros in <ciso646>. - -// Test for macros. -bool test01() -{ - bool test = true; - -#if 0 - -#ifdef and - test = false; -#endif - -#ifdef and_eq - test = false; -#endif - -#ifdef bitand - test = false; -#endif - -#ifdef bitor - test = false; -#endif - -#ifdef compl - test = false; -#endif - -#ifdef not_eq - test = false; -#endif - -#ifdef not_or - test = false; -#endif - -#ifdef or - test = false; -#endif - -#ifdef or_eq - test = false; -#endif - -#ifdef xor - test = false; -#endif - -#ifdef xor_eq - test = false; -#endif - -#endif - - return test; -} - - -// Equivalance in usage. -bool test02() -{ - bool test = true; - - bool arg1 = true; - bool arg2 = false; - int int1 = 45; - int int2 = 0; - - VERIFY( arg1 && int1 ); - VERIFY( arg1 and int1 ); - - VERIFY( (arg1 && arg2) == (arg1 and arg2) ); - VERIFY( (arg1 && int1) == (arg1 and int1) ); - - return test; -} - - -int main(void) -{ - test01(); - test02(); - - return 0; -} diff --git a/libstdc++-v3/testsuite/17_intro/header_csetjmp.cc b/libstdc++-v3/testsuite/17_intro/header_csetjmp.cc index 4e2610de4f2..1cbb630e752 100644 --- a/libstdc++-v3/testsuite/17_intro/header_csetjmp.cc +++ b/libstdc++-v3/testsuite/17_intro/header_csetjmp.cc @@ -1,6 +1,6 @@ // 2001-02-06 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001 Free Software Foundation, Inc. +// Copyright (C) 2001, 2003 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -27,7 +27,7 @@ namespace gnu void test01() { std::jmp_buf env; - int i = setjmp(env); + int i __attribute__((unused)) = setjmp(env); #ifndef setjmp #error "setjmp_must_be_a_macro" #endif diff --git a/libstdc++-v3/testsuite/17_intro/header_cstdarg.cc b/libstdc++-v3/testsuite/17_intro/header_cstdarg.cc index 260e92905cb..9e82930976e 100644 --- a/libstdc++-v3/testsuite/17_intro/header_cstdarg.cc +++ b/libstdc++-v3/testsuite/17_intro/header_cstdarg.cc @@ -1,6 +1,6 @@ // 2001-02-06 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001 Free Software Foundation, Inc. +// Copyright (C) 2001, 2003 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -26,7 +26,7 @@ namespace gnu { void test01() { - std::va_list list; + std::va_list __attribute__((unused)) list; #ifndef va_arg #error "va_arg_must_be_a_macro" #endif diff --git a/libstdc++-v3/testsuite/17_intro/header_cstddef.cc b/libstdc++-v3/testsuite/17_intro/header_cstddef.cc index eab1c75386a..69f83f07f3a 100644 --- a/libstdc++-v3/testsuite/17_intro/header_cstddef.cc +++ b/libstdc++-v3/testsuite/17_intro/header_cstddef.cc @@ -1,6 +1,6 @@ // 2001-02-06 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001 Free Software Foundation, Inc. +// Copyright (C) 2001, 2003 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -32,7 +32,7 @@ namespace gnu void test01() { - std::size_t i = offsetof(struct test_type, i); + std::size_t i __attribute__((unused)) = offsetof(struct test_type, i); #ifndef offsetof #error "offsetof_must_be_a_macro" #endif diff --git a/libstdc++-v3/testsuite/17_intro/header_cstdio.cc b/libstdc++-v3/testsuite/17_intro/header_cstdio.cc index 383cc0a5293..a7be009f9c4 100644 --- a/libstdc++-v3/testsuite/17_intro/header_cstdio.cc +++ b/libstdc++-v3/testsuite/17_intro/header_cstdio.cc @@ -1,6 +1,6 @@ // 2000-01-01 bkoz -// Copyright (C) 2001 Free Software Foundation, Inc. +// Copyright (C) 2001, 2003 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -25,6 +25,6 @@ int main(void) { // Make sure size_t is in namespace std - std::size_t i = 5; + std::size_t i __attribute__((unused)) = 5; return 0; } diff --git a/libstdc++-v3/testsuite/17_intro/header_cstdlib.cc b/libstdc++-v3/testsuite/17_intro/header_cstdlib.cc index f86f423d875..377bd60ace4 100644 --- a/libstdc++-v3/testsuite/17_intro/header_cstdlib.cc +++ b/libstdc++-v3/testsuite/17_intro/header_cstdlib.cc @@ -1,6 +1,6 @@ // 2000-01-01 bkoz -// Copyright (C) 2001, 2002 Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -25,15 +25,15 @@ // libstdc++/2190 void test01() { - long a = std::abs(1L); + long a __attribute__((unused)) = std::abs(1L); std::div(2L, 1L); - std::ldiv_t b; + std::ldiv_t b __attribute__((unused)); } void test02() { // Make sure size_t is in namespace std. - std::size_t i = 5; + std::size_t i __attribute__((unused)) = 5; } int main() diff --git a/libstdc++-v3/testsuite/17_intro/header_cstring.cc b/libstdc++-v3/testsuite/17_intro/header_cstring.cc index ae8852a43e0..3085763954b 100644 --- a/libstdc++-v3/testsuite/17_intro/header_cstring.cc +++ b/libstdc++-v3/testsuite/17_intro/header_cstring.cc @@ -1,6 +1,6 @@ // 2000-01-01 bkoz -// Copyright (C) 2001 Free Software Foundation, Inc. +// Copyright (C) 2001, 2003 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -26,6 +26,6 @@ int main(void) { // Make sure size_t is in namespace std - std::size_t i = std::strlen("tibet shop/san francisco (415) 982-0326"); + std::size_t i __attribute__((unused)) = std::strlen("tibet shop/san francisco (415) 982-0326"); return 0; } diff --git a/libstdc++-v3/testsuite/17_intro/header_ctime.cc b/libstdc++-v3/testsuite/17_intro/header_ctime.cc index 03f8294cda6..1b97d645ec7 100644 --- a/libstdc++-v3/testsuite/17_intro/header_ctime.cc +++ b/libstdc++-v3/testsuite/17_intro/header_ctime.cc @@ -1,6 +1,6 @@ // 2000-01-01 bkoz -// Copyright (C) 2001 Free Software Foundation, Inc. +// Copyright (C) 2001, 2003 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -22,10 +22,9 @@ #include <ctime> - int main(void) { // Make sure size_t is in namespace std - std::size_t i = 5; + std::size_t i __attribute__((unused)) = 5; return 0; } diff --git a/libstdc++-v3/testsuite/17_intro/header_cwchar.cc b/libstdc++-v3/testsuite/17_intro/header_cwchar.cc index 8d65e024195..dc2eefe1431 100644 --- a/libstdc++-v3/testsuite/17_intro/header_cwchar.cc +++ b/libstdc++-v3/testsuite/17_intro/header_cwchar.cc @@ -1,6 +1,6 @@ // 2000-01-01 bkoz -// Copyright (C) 2001 Free Software Foundation, Inc. +// Copyright (C) 2001, 2003 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -25,9 +25,9 @@ int main(void) { // Make sure size_t is in namespace std - std::size_t i = 5; + std::size_t i __attribute__((unused)) = 5; - std::tm mytime; + std::tm __attribute__((unused)) mytime; return 0; } diff --git a/libstdc++-v3/testsuite/18_support/numeric_limits.cc b/libstdc++-v3/testsuite/18_support/numeric_limits.cc index 63d9412c368..a96cdf55453 100644 --- a/libstdc++-v3/testsuite/18_support/numeric_limits.cc +++ b/libstdc++-v3/testsuite/18_support/numeric_limits.cc @@ -62,7 +62,7 @@ DEFINE_EXTREMA(long double, LDBL_MIN, LDBL_MAX); template<typename T> void test_extrema() { - bool test = true; + bool test __attribute__((unused)) = true; T limits_min = std::numeric_limits<T>::min(); T limits_max = std::numeric_limits<T>::max(); T extrema_min = extrema<T>::min; @@ -74,7 +74,7 @@ void test_extrema() template<typename T> void test_epsilon() { - bool test = true; + bool test __attribute__((unused)) = true; T epsilon = std::numeric_limits<T>::epsilon(); T one = 1; @@ -89,7 +89,7 @@ void test_epsilon() void test_sign() { - bool test = true; + bool test __attribute__((unused)) = true; VERIFY( std::numeric_limits<char>::is_signed == char_is_signed ); VERIFY( std::numeric_limits<signed char>::is_signed == true ); VERIFY( std::numeric_limits<unsigned char>::is_signed == false ); @@ -200,7 +200,7 @@ struct B bool test01() { - bool test = true; + bool test __attribute__((unused)) = true; std::numeric_limits< A<B> > obj; VERIFY( !obj.is_specialized ); @@ -244,16 +244,16 @@ void test02() typedef std::numeric_limits<B> b_nl_type; // Should probably do all of them... - const int* pi1 = &b_nl_type::digits; - const int* pi2 = &b_nl_type::digits10; - const int* pi3 = &b_nl_type::max_exponent10; - const bool* pb1 = &b_nl_type::traps; + const int* __attribute__((unused)) pi1 = &b_nl_type::digits; + const int* __attribute__((unused)) pi2 = &b_nl_type::digits10; + const int* __attribute__((unused)) pi3 = &b_nl_type::max_exponent10; + const bool* __attribute__((unused)) pb1 = &b_nl_type::traps; } // libstdc++/5045 bool test03() { - bool test = true; + bool test __attribute__((unused)) = true; VERIFY( std::numeric_limits<bool>::digits10 == 0 ); if (__CHAR_BIT__ == 8) @@ -282,7 +282,7 @@ bool test03() // libstdc++/8949 bool test04() { - bool test = true; + bool test __attribute__((unused)) = true; VERIFY( !std::numeric_limits<short>::is_iec559 ); VERIFY( !std::numeric_limits<unsigned short>::is_iec559 ); diff --git a/libstdc++-v3/testsuite/19_diagnostics/stdexceptions.cc b/libstdc++-v3/testsuite/19_diagnostics/stdexceptions.cc index 267795acb75..30595f0f76a 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/stdexceptions.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/stdexceptions.cc @@ -27,7 +27,7 @@ // libstdc++/1972 void test01() { - bool test = true; + bool test __attribute__((unused)) = true; std::string s("lack of sunlight, no water error"); // 1 @@ -41,7 +41,7 @@ void test01() void test02() { - bool test = true; + bool test __attribute__((unused)) = true; std::string s("lack of sunlight error"); std::domain_error x(s); @@ -57,7 +57,7 @@ public: void test03() { - bool test = true; + bool test __attribute__((unused)) = true; try { throw fuzzy_logic(); } catch(const fuzzy_logic& obj) @@ -78,7 +78,7 @@ void allocate_on_stack(void) } void test04() { - bool test = true; + bool test __attribute__((unused)) = true; const std::string s("CA ISO emergency once again:immediate power down"); const char* strlit1 = "wish I lived in Palo Alto"; const char* strlit2 = "...or Santa Barbara"; diff --git a/libstdc++-v3/testsuite/20_util/allocator_members.cc b/libstdc++-v3/testsuite/20_util/allocator_members.cc index 8c40ab760f7..4170a9d9a96 100644 --- a/libstdc++-v3/testsuite/20_util/allocator_members.cc +++ b/libstdc++-v3/testsuite/20_util/allocator_members.cc @@ -45,7 +45,7 @@ void operator delete(void *v) throw() void test01() { - bool test = true; + bool test __attribute__((unused)) = true; std::allocator<gnu> obj; // XXX These should work for various size allocation and @@ -61,7 +61,7 @@ void test01() // libstdc++/8230 void test02() { - bool test = true; + bool test __attribute__((unused)) = true; try { std::allocator<int> alloc; diff --git a/libstdc++-v3/testsuite/20_util/auto_ptr.cc b/libstdc++-v3/testsuite/20_util/auto_ptr.cc index d70b63f3e9e..110d4b2d4bf 100644 --- a/libstdc++-v3/testsuite/20_util/auto_ptr.cc +++ b/libstdc++-v3/testsuite/20_util/auto_ptr.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2000, 2002 Free Software Foundation +// Copyright (C) 2000, 2002, 2003 Free Software Foundation // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -60,8 +60,8 @@ struct reset_count_struct int test01() { - reset_count_struct reset; - bool test = true; + reset_count_struct __attribute__((unused)) reset; + bool test __attribute__((unused)) = true; std::auto_ptr<A> A_default; VERIFY( A_default.get() == 0 ); @@ -91,8 +91,8 @@ test01() int test02() { - reset_count_struct reset; - bool test = true; + reset_count_struct __attribute__((unused)) reset; + bool test __attribute__((unused)) = true; std::auto_ptr<A> A_from_A(new A); std::auto_ptr<B> B_from_B(new B); @@ -115,8 +115,8 @@ test02() int test03() { - reset_count_struct reset; - bool test = true; + reset_count_struct __attribute__((unused)) reset; + bool test __attribute__((unused)) = true; std::auto_ptr<A> A_from_ptr_A; std::auto_ptr<A> A_from_ptr_B; @@ -141,8 +141,8 @@ test03() int test04() { - reset_count_struct reset; - bool test = true; + reset_count_struct __attribute__((unused)) reset; + bool test __attribute__((unused)) = true; {/*lifetine scope*/ std::auto_ptr<A> A_from_A(new A); @@ -171,8 +171,8 @@ private: int test05() { - bool test = true; - reset_count_struct reset; + bool test __attribute__((unused)) = true; + reset_count_struct __attribute__((unused)) reset; pimpl<A>(); pimpl<B>(); @@ -190,8 +190,8 @@ test05() int test06() { - reset_count_struct reset; - bool test = true; + reset_count_struct __attribute__((unused)) reset; + bool test __attribute__((unused)) = true; std::auto_ptr<A> A_from_A(new A); std::auto_ptr<A> A_from_A_ptr(A_from_A.release()); @@ -231,8 +231,8 @@ static void drain(std::auto_ptr<T>) int test07() { - bool test = true; - reset_count_struct reset; + bool test __attribute__((unused)) = true; + reset_count_struct __attribute__((unused)) reset; drain(source<A>()); // The resolution of core issue 84, now a DR, breaks this call. diff --git a/libstdc++-v3/testsuite/20_util/binders.cc b/libstdc++-v3/testsuite/20_util/binders.cc index 6dd45e3ff96..a12d3b68146 100644 --- a/libstdc++-v3/testsuite/20_util/binders.cc +++ b/libstdc++-v3/testsuite/20_util/binders.cc @@ -1,6 +1,6 @@ // 2001-06-11 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001 Free Software Foundation, Inc. +// Copyright (C) 2001, 2003 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -27,8 +27,8 @@ class Elem { public: - void print(int i) const { } - void modify(int i) { } + void print(int) const { } + void modify(int) { } }; // libstdc++/3113 diff --git a/libstdc++-v3/testsuite/20_util/pairs.cc b/libstdc++-v3/testsuite/20_util/pairs.cc index 451ef19703b..085937f435f 100644 --- a/libstdc++-v3/testsuite/20_util/pairs.cc +++ b/libstdc++-v3/testsuite/20_util/pairs.cc @@ -46,7 +46,7 @@ template<typename T> // heterogeneous void test01() { - bool test = true; + bool test __attribute__((unused)) = true; std::pair<bool, long> p_bl_1(true, 433); std::pair<bool, long> p_bl_2 = std::make_pair(true, 433); @@ -75,7 +75,7 @@ void test01() // homogeneous void test02() { - bool test = true; + bool test __attribute__((unused)) = true; std::pair<bool, bool> p_bb_1(true, false); std::pair<bool, bool> p_bb_2 = std::make_pair(true, false); @@ -87,7 +87,7 @@ void test02() // const void test03() { - bool test = true; + bool test __attribute__((unused)) = true; const std::pair<bool, long> p_bl_1(true, 433); const std::pair<bool, long> p_bl_2 = std::make_pair(true, 433); @@ -116,7 +116,7 @@ void test03() // const& void test04() { - bool test = true; + bool test __attribute__((unused)) = true; const gnu_obj& obj1 = gnu_obj(5); const std::pair<const char*, gnu_obj> p_sg_1("enlightenment", obj1); const std::pair<const char*, gnu_obj> p_sg_2 = diff --git a/libstdc++-v3/testsuite/20_util/raw_storage_iterator.cc b/libstdc++-v3/testsuite/20_util/raw_storage_iterator.cc index 7d59a8a6099..c79e5400581 100644 --- a/libstdc++-v3/testsuite/20_util/raw_storage_iterator.cc +++ b/libstdc++-v3/testsuite/20_util/raw_storage_iterator.cc @@ -1,6 +1,6 @@ // 2001-06-18 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001 Free Software Foundation, Inc. +// Copyright (C) 2001, 2003 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -31,7 +31,7 @@ void test01() typedef raw_storage_iterator<long*, long> test_iterator; typedef iterator<output_iterator_tag, void, void, void, void> base_iterator; test_iterator rs_it(&l); - base_iterator* base = &rs_it; + base_iterator* base __attribute__((unused)) = &rs_it; // Check for required typedefs typedef test_iterator::value_type value_type; diff --git a/libstdc++-v3/testsuite/20_util/temporary_buffer.cc b/libstdc++-v3/testsuite/20_util/temporary_buffer.cc index 602b2fe80b7..e83a82efcf8 100644 --- a/libstdc++-v3/testsuite/20_util/temporary_buffer.cc +++ b/libstdc++-v3/testsuite/20_util/temporary_buffer.cc @@ -27,7 +27,7 @@ struct junk { char j[12]; }; int main(void) { - bool test = true; + bool test __attribute__((unused)) = true; std::pair<junk*,ptrdiff_t> results = std::get_temporary_buffer<junk>(5); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/append/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/append/char/1.cc index 496a6e54309..8fd48e555b9 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/append/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/append/char/1.cc @@ -26,12 +26,11 @@ bool test01(void) { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::string::size_type csize_type; typedef std::string::const_reference cref; typedef std::string::reference ref; - csize_type npos = std::string::npos; - csize_type csz01, csz02; + csize_type csz01; const char str_lit01[] = "point bolivar, texas"; const std::string str01(str_lit01); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/append/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/append/wchar_t/1.cc index f6002f9af5d..194e09d2184 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/append/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/append/wchar_t/1.cc @@ -26,12 +26,11 @@ bool test01(void) { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::wstring::size_type csize_type; typedef std::wstring::const_reference cref; typedef std::wstring::reference ref; - csize_type npos = std::wstring::npos; - csize_type csz01, csz02; + csize_type csz01; const wchar_t str_lit01[] = L"point bolivar, texas"; const std::wstring str01(str_lit01); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/assign/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/assign/char/1.cc index 879d3c139c7..1aa8a67809d 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/assign/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/assign/char/1.cc @@ -27,7 +27,7 @@ void test01() { - bool test = true; + bool test __attribute__((unused)) = true; using namespace std; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/assign/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/assign/char/2.cc index 9783c45202c..9635b1b47ff 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/assign/char/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/assign/char/2.cc @@ -28,7 +28,7 @@ void test02() { - bool test = true; + bool test __attribute__((unused)) = true; using namespace std; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/assign/char/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/assign/char/3.cc index cfc35545da4..0c08fe7c72e 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/assign/char/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/assign/char/3.cc @@ -29,7 +29,7 @@ void test03() { - bool test = true; + bool test __attribute__((unused)) = true; using namespace std; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/assign/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/assign/wchar_t/1.cc index 5f110598bb9..377e35bf7b5 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/assign/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/assign/wchar_t/1.cc @@ -27,7 +27,7 @@ void test01() { - bool test = true; + bool test __attribute__((unused)) = true; using namespace std; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/assign/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/assign/wchar_t/2.cc index 458204c522e..7064d1f935f 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/assign/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/assign/wchar_t/2.cc @@ -28,7 +28,7 @@ void test02() { - bool test = true; + bool test __attribute__((unused)) = true; using namespace std; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/assign/wchar_t/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/assign/wchar_t/3.cc index fc9b5a21eea..0d46ebe653d 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/assign/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/assign/wchar_t/3.cc @@ -29,7 +29,7 @@ void test03() { - bool test = true; + bool test __attribute__((unused)) = true; using namespace std; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/1.cc index 0a50ee7d9ed..c37e01fb046 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/1.cc @@ -125,7 +125,7 @@ namespace std void test01() { - bool test = true; + bool test __attribute__((unused)) = true; // non POD types : resize, capacity, reserve std::basic_string< A<B> > str02; @@ -140,7 +140,7 @@ void test01() VERIFY( sz04 >= 100 ); str02.reserve(); sz03 = str02.capacity(); - VERIFY( sz03 >= 0 ); + VERIFY( sz03 > 0 ); sz03 = str02.size() + 5; str02.resize(sz03); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/1.cc index 6072898318a..649c5418ba6 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/1.cc @@ -26,7 +26,7 @@ void test01() { // POD types : resize, capacity, reserve - bool test = true; + bool test __attribute__((unused)) = true; std::string str01; typedef std::string::size_type size_type_s; @@ -37,7 +37,7 @@ void test01() VERIFY( sz02 >= 100 ); str01.reserve(); sz01 = str01.capacity(); - VERIFY( sz01 >= 0 ); + VERIFY( sz01 > 0 ); sz01 = str01.size() + 5; str01.resize(sz01); @@ -79,9 +79,7 @@ void test01() // trickster allocator issues involved with these: std::string str3 = "8-chars_8-chars_"; - const char* p3 = str3.c_str(); std::string str4 = str3 + "7-chars"; - const char* p4 = str3.c_str(); sz01 = str01.size(); sz02 = str01.max_size(); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/2.cc index 731a9187065..b88597486bd 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/2.cc @@ -27,7 +27,7 @@ // http://gcc.gnu.org/ml/libstdc++/2001-11/msg00150.html void test02() { - bool test = true; + bool test __attribute__((unused)) = true; std::string str01 = "twelve chars"; // str01 becomes shared diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/1.cc index 18af608d7d1..f10a25578a0 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/1.cc @@ -26,7 +26,7 @@ void test01() { // POD types : resize, capacity, reserve - bool test = true; + bool test __attribute__((unused)) = true; std::wstring str01; typedef std::wstring::size_type size_type_s; @@ -37,7 +37,7 @@ void test01() VERIFY( sz02 >= 100 ); str01.reserve(); sz01 = str01.capacity(); - VERIFY( sz01 >= 0 ); + VERIFY( sz01 > 0 ); sz01 = str01.size() + 5; str01.resize(sz01); @@ -79,9 +79,7 @@ void test01() // trickster allocator issues involved with these: std::wstring str3 = L"8-chars_8-chars_"; - const wchar_t* p3 = str3.c_str(); std::wstring str4 = str3 + L"7-chars"; - const wchar_t* p4 = str3.c_str(); sz01 = str01.size(); sz02 = str01.max_size(); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/2.cc index 08aa2294bfa..e611567ecd5 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/2.cc @@ -27,7 +27,7 @@ // http://gcc.gnu.org/ml/libstdc++/2001-11/msg00150.html void test02() { - bool test = true; + bool test __attribute__((unused)) = true; std::wstring str01 = L"twelve chars"; // str01 becomes shared diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/1.cc index 8f673c89dbf..996f8ad0d32 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/1.cc @@ -27,11 +27,11 @@ void test01(void) { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::string::size_type csize_type; typedef std::string::iterator citerator; csize_type npos = std::string::npos; - csize_type csz01, csz02; + csize_type csz01; const char str_lit01[] = "rodeo beach, marin"; const std::string str01(str_lit01); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/2.cc index d6458a96712..85c82ba78cf 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/2.cc @@ -25,7 +25,7 @@ void test02() { - bool test = true; + bool test __attribute__((unused)) = true; // template<typename _InputIter> // basic_string(_InputIter begin, _InputIter end, const allocator& a) diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/3.cc index 6f40dda1833..fc86271d0bc 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/3.cc @@ -27,7 +27,7 @@ void test03() { - bool test = true; + bool test __attribute__((unused)) = true; const char* with_nulls = "This contains \0 a zero byte."; // These are tests to see how basic_string handles data with NUL diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/4.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/4.cc index fe2f3213215..020eff6f229 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/4.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/4.cc @@ -26,7 +26,7 @@ // http://gcc.gnu.org/ml/libstdc++/2002-06/msg00025.html void test04() { - bool test = true; + bool test __attribute__((unused)) = true; std::string str01("portofino"); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/5.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/5.cc index 4b2f4015854..0aecd998e33 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/5.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/5.cc @@ -27,7 +27,7 @@ // libstdc++/8347 void test05() { - bool test = true; + bool test __attribute__((unused)) = true; std::vector<char> empty; std::string empty2(empty.begin(), empty.end()); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/1.cc index b1a5b6dd40a..45715fd5c14 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/1.cc @@ -27,11 +27,11 @@ void test01(void) { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::wstring::size_type csize_type; typedef std::wstring::iterator citerator; csize_type npos = std::wstring::npos; - csize_type csz01, csz02; + csize_type csz01; const wchar_t str_lit01[] = L"rodeo beach, marin"; const std::wstring str01(str_lit01); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/2.cc index 9eaf4ce2700..c7b6422675a 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/2.cc @@ -25,7 +25,7 @@ void test02() { - bool test = true; + bool test __attribute__((unused)) = true; // template<typename _InputIter> // basic_string(_InputIter begin, _InputIter end, const allocator& a) diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/3.cc index 46b7287b0e0..882e22c59df 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/3.cc @@ -27,7 +27,7 @@ void test03() { - bool test = true; + bool test __attribute__((unused)) = true; const wchar_t* with_nulls = L"This contains \0 a zero byte."; // These are tests to see how basic_string handles data with NUL diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/4.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/4.cc index 87dab121eab..9140ff759e4 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/4.cc @@ -26,7 +26,7 @@ // http://gcc.gnu.org/ml/libstdc++/2002-06/msg00025.html void test04() { - bool test = true; + bool test __attribute__((unused)) = true; std::wstring str01(L"portofino"); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/5.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/5.cc index d02dc9c8f4b..a426f292c88 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/5.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/5.cc @@ -27,7 +27,7 @@ // libstdc++/8347 void test05() { - bool test = true; + bool test __attribute__((unused)) = true; std::vector<wchar_t> empty; std::wstring empty2(empty.begin(), empty.end()); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/1.cc index f594df72847..556039e6e1d 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/1.cc @@ -26,11 +26,10 @@ bool test01(void) { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::string::size_type csize_type; typedef std::string::const_reference cref; typedef std::string::reference ref; - csize_type npos = std::string::npos; csize_type csz01, csz02; const std::string str01("tamarindo, costa rica"); @@ -56,7 +55,7 @@ bool test01(void) cref cref3 = str01.at(csz01 - 1); VERIFY( cref3 == 'a' ); try { - cref cref4 = str01.at(csz01); + str01.at(csz01); VERIFY( false ); // Should not get here, as exception thrown. } catch(std::out_of_range& fail) { @@ -71,7 +70,7 @@ bool test01(void) ref ref3 = str02.at(csz02 - 1); VERIFY( ref3 == 'a' ); try { - ref ref4 = str02.at(csz02); + str02.at(csz02); VERIFY( false ); // Should not get here, as exception thrown. } catch(std::out_of_range& fail) { diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/2.cc index d2b5831ad6b..34c1772d4ce 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/2.cc @@ -29,11 +29,10 @@ // underlying string implementation, of course. bool test01(void) { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::string::size_type csize_type; typedef std::string::iterator siterator; typedef std::string::reverse_iterator sriterator; - csize_type npos = std::string::npos; csize_type csz01, csz02; siterator it1; sriterator rit1; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/3.cc index 1c7ee5bbdf7..fec27bb5ef2 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/3.cc @@ -28,12 +28,10 @@ // iterators, namely insert and erase. bool test02(void) { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::string::size_type csize_type; typedef std::string::iterator siterator; typedef std::string::reverse_iterator sriterator; - csize_type npos = std::string::npos; - csize_type csz01, csz02; siterator it1; sriterator rit1; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/1.cc index 3c39bc555cc..11f5921eda2 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/1.cc @@ -26,11 +26,10 @@ bool test01(void) { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::wstring::size_type csize_type; typedef std::wstring::const_reference cref; typedef std::wstring::reference ref; - csize_type npos = std::wstring::npos; csize_type csz01, csz02; const std::wstring str01(L"tamarindo, costa rica"); @@ -56,7 +55,7 @@ bool test01(void) cref cref3 = str01.at(csz01 - 1); VERIFY( cref3 == L'a' ); try { - cref cref4 = str01.at(csz01); + str01.at(csz01); VERIFY( false ); // Should not get here, as exception thrown. } catch(std::out_of_range& fail) { @@ -71,7 +70,7 @@ bool test01(void) ref ref3 = str02.at(csz02 - 1); VERIFY( ref3 == L'a' ); try { - ref ref4 = str02.at(csz02); + str02.at(csz02); VERIFY( false ); // Should not get here, as exception thrown. } catch(std::out_of_range& fail) { diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/2.cc index e2455e635e7..a8e86fbf582 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/2.cc @@ -29,11 +29,10 @@ // underlying string implementation, of course. bool test01(void) { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::wstring::size_type csize_type; typedef std::wstring::iterator siterator; typedef std::wstring::reverse_iterator sriterator; - csize_type npos = std::wstring::npos; csize_type csz01, csz02; siterator it1; sriterator rit1; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/3.cc index 0ef50cc8fb7..defd0875a8b 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/3.cc @@ -28,12 +28,10 @@ // iterators, namely insert and erase. bool test02(void) { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::wstring::size_type csize_type; typedef std::wstring::iterator siterator; typedef std::wstring::reverse_iterator sriterator; - csize_type npos = std::wstring::npos; - csize_type csz01, csz02; siterator it1; sriterator rit1; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/find/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/find/char/1.cc index 0f2236cbe1a..485ef4f1fc1 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/find/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/find/char/1.cc @@ -25,7 +25,7 @@ bool test01(void) { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::string::size_type csize_type; typedef std::string::const_reference cref; typedef std::string::reference ref; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/find/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/find/char/2.cc index 9c3e2f079a8..6874f833ea5 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/find/char/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/find/char/2.cc @@ -25,7 +25,7 @@ bool test02(void) { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::string::size_type csize_type; csize_type npos = std::string::npos; csize_type csz01, csz02; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/find/char/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/find/char/3.cc index 15d0ee2ef52..24b73333744 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/find/char/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/find/char/3.cc @@ -25,7 +25,7 @@ bool test03(void) { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::string::size_type csize_type; csize_type npos = std::string::npos; csize_type csz01; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/1.cc index 6ed224b3b31..11d14e59b18 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/1.cc @@ -25,7 +25,7 @@ bool test01(void) { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::wstring::size_type csize_type; typedef std::wstring::const_reference cref; typedef std::wstring::reference ref; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/2.cc index 4635dac1267..a0f0466e105 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/2.cc @@ -25,7 +25,7 @@ bool test02(void) { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::wstring::size_type csize_type; csize_type npos = std::wstring::npos; csize_type csz01, csz02; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/3.cc index c874229d853..6964e013f30 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/3.cc @@ -25,7 +25,7 @@ bool test03(void) { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::wstring::size_type csize_type; csize_type npos = std::wstring::npos; csize_type csz01; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/insert/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/insert/char/1.cc index 919c8717b0a..e1c54025075 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/insert/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/insert/char/1.cc @@ -26,10 +26,9 @@ int test01(void) { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::string::size_type csize_type; typedef std::string::iterator citerator; - csize_type npos = std::string::npos; csize_type csz01, csz02; const std::string str01("rodeo beach, marin"); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/insert/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/insert/char/2.cc index d39bbe2d091..44384533a18 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/insert/char/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/insert/char/2.cc @@ -29,7 +29,7 @@ // but now s points inside the _Rep int test02(void) { - bool test = true; + bool test __attribute__((unused)) = true; std::string str01; const char* title = "Everything was beautiful, and nothing hurt"; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/insert/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/insert/wchar_t/1.cc index f439df907d9..2e6fdfd2c70 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/insert/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/insert/wchar_t/1.cc @@ -26,10 +26,9 @@ int test01(void) { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::wstring::size_type csize_type; typedef std::wstring::iterator citerator; - csize_type npos = std::wstring::npos; csize_type csz01, csz02; const std::wstring str01(L"rodeo beach, marin"); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/insert/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/insert/wchar_t/2.cc index 8b1468b3338..a1a5389656a 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/insert/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/insert/wchar_t/2.cc @@ -29,7 +29,7 @@ // but now s points inside the _Rep int test02(void) { - bool test = true; + bool test __attribute__((unused)) = true; std::wstring str01; const wchar_t* title = L"Everything was beautiful, and nothing hurt"; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/1.cc index ba92251c6ad..fb2721782c9 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/1.cc @@ -33,12 +33,10 @@ bool test01(void) { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::string::size_type csize_type; typedef std::string::const_reference cref; typedef std::string::reference ref; - csize_type npos = std::string::npos; - csize_type csz01, csz02; const std::string str01("sailing grand traverse bay\n" "\t\t\t from Elk Rapids to the point reminds me of miles"); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/4.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/4.cc index b53ca2764d2..1fbc3d05dc8 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/4.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/4.cc @@ -30,11 +30,11 @@ // testing basic_stringbuf::xsputn via stress testing with large strings // based on a bug report libstdc++ 9 -void test04(int size) +void test04(std::size_t size) { - bool test = true; + bool test __attribute__((unused)) = true; std::string str(size, 's'); - int expected_size = 2 * (size + 1); + std::size_t expected_size = 2 * (size + 1); std::ostringstream oss(str); // sanity checks diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/5.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/5.cc index 416a1df4421..7ba1cecea81 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/5.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/5.cc @@ -32,9 +32,9 @@ // testing basic_filebuf::xsputn via stress testing with large strings // based on a bug report libstdc++ 9 // mode == out -void test05(int size) +void test05(std::size_t size) { - bool test = true; + bool test __attribute__((unused)) = true; const char filename[] = "inserters_extractors-1.txt"; const char fillc = 'f'; std::ofstream ofs(filename); @@ -60,7 +60,7 @@ void test05(int size) // sanity check on the written file std::ifstream ifs(filename); - int count = 0; + std::size_t count = 0; char c; while (count <= (2 * size) + 4) { diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/6.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/6.cc index 195ef9dc2ff..b074ff2d44c 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/6.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/6.cc @@ -33,7 +33,7 @@ // http://gcc.gnu.org/ml/libstdc++/1999-q4/msg00049.html void test06(void) { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::string::size_type size_type; std::string str01("@silent"); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/7.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/7.cc index 07e3ce63cac..02a2de8f051 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/7.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/7.cc @@ -34,7 +34,7 @@ // NB: this is a defect in the standard. void test07(void) { - bool test = true; + bool test __attribute__((unused)) = true; const std::string name("z6.cc"); std::istringstream iss (name); int i = 0; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/8.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/8.cc index bdc848e8055..4d5556661d4 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/8.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/8.cc @@ -34,7 +34,7 @@ void test08() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; istringstream istrm("enero:2001"); int year; char sep; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/9.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/9.cc index fb201c26929..6755af3f4e1 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/9.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/9.cc @@ -32,7 +32,7 @@ // libstdc++/2830 void test09() { - bool test = true; + bool test __attribute__((unused)) = true; std::string blanks( 3, '\0'); std::string foo = "peace"; foo += blanks; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/1.cc index 46718003d77..e77dbc1dc1d 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/1.cc @@ -33,12 +33,10 @@ bool test01(void) { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::wstring::size_type csize_type; typedef std::wstring::const_reference cref; typedef std::wstring::reference ref; - csize_type npos = std::wstring::npos; - csize_type csz01, csz02; const std::wstring str01(L"sailing grand traverse bay\n" L"\t\t\t from Elk Rapids to the point reminds me of miles"); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/4.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/4.cc index fd844438184..ba4f84cead1 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/4.cc @@ -30,11 +30,11 @@ // testing basic_stringbuf::xsputn via stress testing with large strings // based on a bug report libstdc++ 9 -void test04(int size) +void test04(std::size_t size) { - bool test = true; + bool test __attribute__((unused)) = true; std::wstring str(size, L's'); - int expected_size = 2 * (size + 1); + std::size_t expected_size = 2 * (size + 1); std::wostringstream oss(str); // sanity checks diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/5.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/5.cc index 6d5c69cc1a3..9a88091fd8f 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/5.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/5.cc @@ -32,9 +32,9 @@ // testing basic_filebuf::xsputn via stress testing with large strings // based on a bug report libstdc++ 9 // mode == out -void test05(int size) +void test05(std::size_t size) { - bool test = true; + bool test __attribute__((unused)) = true; const char filename[] = "inserters_extractors-1.txt"; const wchar_t fillc = L'f'; std::wofstream ofs(filename); @@ -60,7 +60,7 @@ void test05(int size) // sanity check on the written file std::wifstream ifs(filename); - int count = 0; + std::size_t count = 0; wchar_t c; while (count <= (2 * size) + 4) { diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/6.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/6.cc index 1fa1fb07ca3..33699eb974a 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/6.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/6.cc @@ -33,7 +33,7 @@ // http://gcc.gnu.org/ml/libstdc++/1999-q4/msg00049.html void test06(void) { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::wstring::size_type size_type; std::wstring str01(L"@silent"); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/7.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/7.cc index 0a3775c0bc6..1971e959af3 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/7.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/7.cc @@ -34,7 +34,7 @@ // NB: this is a defect in the standard. void test07(void) { - bool test = true; + bool test __attribute__((unused)) = true; const std::wstring name(L"z6.cc"); std::wistringstream iss(name); int i = 0; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/8.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/8.cc index d43d818633f..24aef6f6f18 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/8.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/8.cc @@ -34,7 +34,7 @@ void test08() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; wistringstream istrm(L"enero:2001"); int year; wchar_t sep; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/9.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/9.cc index 726dacc9816..d83a17c3cac 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/9.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/9.cc @@ -32,7 +32,7 @@ // libstdc++/2830 void test09() { - bool test = true; + bool test __attribute__((unused)) = true; std::wstring blanks(3, L'\0'); std::wstring foo = L"peace"; foo += blanks; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/1.cc index dec24cff731..b7337b2fd8d 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/1.cc @@ -26,7 +26,7 @@ int test01(void) { - bool test = true; + bool test __attribute__((unused)) = true; std::string str1; std::string str2; @@ -35,11 +35,11 @@ int test01(void) // 1:8-chars_8-chars_ // 2:8-chars_8-chars_ str1 = std::string("8-chars_") + "8-chars_"; - const char* p1 = str1.c_str(); + str1.c_str(); // printf("1:%s\n", str1.c_str()); str2 = str1 + "7-chars"; // printf("2:%s\n", str1.c_str()); //str1 is gone - const char* p2 = str1.c_str(); + str1.c_str(); return 0; } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/2.cc index bc3351d02fb..c60985e4e2a 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/2.cc @@ -115,7 +115,7 @@ template<class charT, class traits, class Allocator> int test01(void) { - bool test = true; + bool test __attribute__((unused)) = true; std::string str_0("costa rica"); std::string str_1("costa marbella"); std::string str_2("cost"); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/1.cc index 1dec0cb6895..98b42f9f769 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/1.cc @@ -26,7 +26,7 @@ int test01(void) { - bool test = true; + bool test __attribute__((unused)) = true; std::wstring str1; std::wstring str2; @@ -35,11 +35,11 @@ int test01(void) // 1:8-chars_8-chars_ // 2:8-chars_8-chars_ str1 = std::wstring(L"8-chars_") + L"8-chars_"; - const wchar_t* p1 = str1.c_str(); + str1.c_str(); // wprintf("1:%s\n", str1.c_str()); str2 = str1 + L"7-chars"; // wprintf("2:%s\n", str1.c_str()); //str1 is gone - const wchar_t* p2 = str1.c_str(); + str1.c_str(); return 0; } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/2.cc index d92450d23ba..86ac5dbbf46 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/2.cc @@ -115,7 +115,7 @@ template<class charT, class traits, class Allocator> int test01(void) { - bool test = true; + bool test __attribute__((unused)) = true; std::wstring str_0(L"costa rica"); std::wstring str_1(L"costa marbella"); std::wstring str_2(L"cost"); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/1.cc index d4c632b7a42..49713242855 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/1.cc @@ -25,12 +25,10 @@ bool test01(void) { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::string::size_type csize_type; typedef std::string::const_reference cref; typedef std::string::reference ref; - csize_type npos = std::string::npos; - csize_type csz01, csz02; const char str_lit01[] = "ventura, california"; const std::string str01(str_lit01); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/2.cc index 7731edd37a4..08efb962c9e 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/2.cc @@ -26,7 +26,7 @@ void test02() { - bool test = true; + bool test __attribute__((unused)) = true; const char* strlit = "../the long pier/Hanalei Bay/Kauai/Hawaii"; std::string aux = strlit; aux.replace(aux.begin()+5, aux.begin()+20, diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/3.cc index a04d13d4024..81cde7bceef 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/3.cc @@ -27,7 +27,7 @@ void test03() { - bool test = true; + bool test __attribute__((unused)) = true; const char* title01 = "nine types of ambiguity"; const char* title02 = "ultra"; std::string str01 = title01; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/4.cc b/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/4.cc index fcb924a8222..14a294221d6 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/4.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/4.cc @@ -29,7 +29,7 @@ void test04() { - bool test = true; + bool test __attribute__((unused)) = true; std::string str01 = "geogaddi"; std::string str02; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/5.cc b/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/5.cc index 8c112c545ed..4e1837f89b2 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/5.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/5.cc @@ -28,7 +28,7 @@ void test05() { - bool test = true; + bool test __attribute__((unused)) = true; std::string str01 = "londinium"; std::string str02 = "cydonia"; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/1.cc index 19ee154025f..8d2209da497 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/1.cc @@ -25,12 +25,10 @@ bool test01(void) { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::wstring::size_type csize_type; typedef std::wstring::const_reference cref; typedef std::wstring::reference ref; - csize_type npos = std::wstring::npos; - csize_type csz01, csz02; const wchar_t str_lit01[] = L"ventura, california"; const std::wstring str01(str_lit01); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/2.cc index da9678a338f..2ee38141ca2 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/2.cc @@ -27,7 +27,7 @@ void test02() { - bool test = true; + bool test __attribute__((unused)) = true; const wchar_t* strlit = L"../the long pier/Hanalei Bay/Kauai/Hawaii"; std::wstring aux = strlit; aux.replace(aux.begin()+5, aux.begin()+20, diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/3.cc index 2ff6ef28294..b50af79b0ad 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/3.cc @@ -27,7 +27,7 @@ void test03() { - bool test = true; + bool test __attribute__((unused)) = true; const wchar_t* title01 = L"nine types of ambiguity"; const wchar_t* title02 = L"ultra"; std::wstring str01 = title01; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/4.cc b/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/4.cc index 94baa82250d..d11dec82fd2 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/4.cc @@ -29,7 +29,7 @@ void test04() { - bool test = true; + bool test __attribute__((unused)) = true; std::wstring str01 = L"geogaddi"; std::wstring str02; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/5.cc b/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/5.cc index f54cfb9a2e7..1f8d4d9feb4 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/5.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/5.cc @@ -28,7 +28,7 @@ void test05() { - bool test = true; + bool test __attribute__((unused)) = true; std::wstring str01 = L"londinium"; std::wstring str02 = L"cydonia"; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/rfind/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/rfind/char/1.cc index ddc791b6c4a..42913dc3b4d 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/rfind/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/rfind/char/1.cc @@ -24,7 +24,7 @@ // 21.3.6.2 basic_string rfind bool test01(void) { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::string::size_type csize_type; typedef std::string::const_reference cref; typedef std::string::reference ref; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/rfind/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/rfind/char/2.cc index d186199a138..1f0f5a3367e 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/rfind/char/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/rfind/char/2.cc @@ -24,7 +24,7 @@ // 21.3.6.4 basic_string::find_last_of bool test02() { - bool test = true; + bool test __attribute__((unused)) = true; std::string z("ab"); std::string::size_type pos; pos = z.find_last_of("ab"); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/rfind/char/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/rfind/char/3.cc index 3517d4da169..9c3bec96fac 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/rfind/char/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/rfind/char/3.cc @@ -24,7 +24,7 @@ // 21.3.6.6 basic_string::find_last_not_of bool test03() { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::string::size_type csize_type; std::string::size_type pos; csize_type npos = std::string::npos; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/rfind/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/rfind/wchar_t/1.cc index bfb1f914c21..46077a8550f 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/rfind/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/rfind/wchar_t/1.cc @@ -24,7 +24,7 @@ // 21.3.6.2 basic_string rfind bool test01(void) { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::wstring::size_type csize_type; typedef std::wstring::const_reference cref; typedef std::wstring::reference ref; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/rfind/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/rfind/wchar_t/2.cc index 2f813b9b28b..af012b9d069 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/rfind/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/rfind/wchar_t/2.cc @@ -24,7 +24,7 @@ // 21.3.6.4 basic_string::find_last_of bool test02() { - bool test = true; + bool test __attribute__((unused)) = true; std::wstring::size_type pos; std::wstring z(L"ab"); pos = z.find_last_of(L"ab"); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/rfind/wchar_t/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/rfind/wchar_t/3.cc index a94da0d3e85..7c564e769e7 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/rfind/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/rfind/wchar_t/3.cc @@ -24,7 +24,7 @@ // 21.3.6.6 basic_string::find_last_not_of bool test03() { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::wstring::size_type csize_type; std::wstring::size_type pos; csize_type npos = std::wstring::npos; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/substr/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/substr/char/1.cc index 486892a62e0..b1ed63d60ae 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/substr/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/substr/char/1.cc @@ -26,12 +26,11 @@ bool test01(void) { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::string::size_type csize_type; typedef std::string::const_reference cref; typedef std::string::reference ref; - csize_type npos = std::string::npos; - csize_type csz01, csz02; + csize_type csz01; const char str_lit01[] = "rockaway, pacifica"; const std::string str01(str_lit01); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/substr/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/substr/wchar_t/1.cc index 1a4e4f63936..da00f1c507b 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/substr/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/substr/wchar_t/1.cc @@ -26,12 +26,11 @@ bool test01(void) { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::wstring::size_type csize_type; typedef std::wstring::const_reference cref; typedef std::wstring::reference ref; - csize_type npos = std::wstring::npos; - csize_type csz01, csz02; + csize_type csz01; const wchar_t str_lit01[] = L"rockaway, pacifica"; const std::wstring str01(str_lit01); diff --git a/libstdc++-v3/testsuite/21_strings/c_strings/char/1.cc b/libstdc++-v3/testsuite/21_strings/c_strings/char/1.cc index 7dfe6c24cf2..c18b4238a6e 100644 --- a/libstdc++-v3/testsuite/21_strings/c_strings/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/c_strings/char/1.cc @@ -25,7 +25,7 @@ void test01() { - bool test = true; + bool test __attribute__((unused)) = true; char c = 'a'; const char cc = 'b'; char* c1 = &c; diff --git a/libstdc++-v3/testsuite/21_strings/c_strings/char/2.cc b/libstdc++-v3/testsuite/21_strings/c_strings/char/2.cc index 7ec0561b887..2eaac5e7d35 100644 --- a/libstdc++-v3/testsuite/21_strings/c_strings/char/2.cc +++ b/libstdc++-v3/testsuite/21_strings/c_strings/char/2.cc @@ -31,14 +31,15 @@ void test02() const char* ccarray2 = "san francisco sunny-day park inspectors"; char carray[50]; strcpy(carray, ccarray1); - void* v = carray; const void* cv = ccarray1; - - memchr(cv, '/', 3); - strchr(ccarray1, '/'); - strpbrk(ccarray1, ccarray2); - strrchr(ccarray1, 'c'); - strstr(carray, carray); + void* v; + char* c; + + v = memchr(cv, '/', 3); + c = strchr(ccarray1, '/'); + c = strrchr(ccarray1, 'c'); + c = strpbrk(ccarray1, ccarray2); + c = strstr(carray, carray); } int main() diff --git a/libstdc++-v3/testsuite/21_strings/c_strings/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/c_strings/wchar_t/1.cc index 3ad6aed1e0a..7c4395aea3d 100644 --- a/libstdc++-v3/testsuite/21_strings/c_strings/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/c_strings/wchar_t/1.cc @@ -26,7 +26,7 @@ void test01() { - bool test = true; + bool test __attribute__((unused)) = true; wchar_t c = L'a'; const wchar_t cc = L'b'; wchar_t* c1 = &c; diff --git a/libstdc++-v3/testsuite/21_strings/c_strings/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/c_strings/wchar_t/2.cc index 3a8f77cd335..19a7ebe3042 100644 --- a/libstdc++-v3/testsuite/21_strings/c_strings/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/21_strings/c_strings/wchar_t/2.cc @@ -32,12 +32,13 @@ void test02() const wchar_t* ccarray2 = L"san francisco sunny-day park inspectors"; wchar_t carray[50]; wcscpy(carray, ccarray1); - - wmemchr(ccarray1, L'/', 3); - wcschr(ccarray1, L'/'); - wcspbrk(ccarray1, ccarray2); - wcsrchr(ccarray1, L'c'); - wcsstr(carray, carray); + wchar_t* w; + + w = wmemchr(ccarray1, L'/', 3); + w = wcschr(ccarray1, L'/'); + w = wcspbrk(ccarray1, ccarray2); + w = wcsrchr(ccarray1, L'c'); + w = wcsstr(carray, carray); } int main() diff --git a/libstdc++-v3/testsuite/21_strings/char_traits/requirements/char/1.cc b/libstdc++-v3/testsuite/21_strings/char_traits/requirements/char/1.cc index 6f8eb473737..4ef29f20d35 100644 --- a/libstdc++-v3/testsuite/21_strings/char_traits/requirements/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/char_traits/requirements/char/1.cc @@ -25,7 +25,7 @@ void test01(void) { - bool test = true; + bool test __attribute__((unused)) = true; const std::string str_01("zuma beach"); const std::string str_02("montara and ocean beach"); diff --git a/libstdc++-v3/testsuite/21_strings/char_traits/requirements/short/1.cc b/libstdc++-v3/testsuite/21_strings/char_traits/requirements/short/1.cc index 4a61942efc7..b38b3cff177 100644 --- a/libstdc++-v3/testsuite/21_strings/char_traits/requirements/short/1.cc +++ b/libstdc++-v3/testsuite/21_strings/char_traits/requirements/short/1.cc @@ -29,7 +29,7 @@ void test02(void) { - bool test = true; + bool test __attribute__((unused)) = true; // 21.1.1 character traits requirements diff --git a/libstdc++-v3/testsuite/21_strings/char_traits/requirements/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/char_traits/requirements/wchar_t/1.cc index a93d2f50f2e..d4a64ae4a10 100644 --- a/libstdc++-v3/testsuite/21_strings/char_traits/requirements/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/char_traits/requirements/wchar_t/1.cc @@ -25,7 +25,7 @@ void test02(void) { - bool test = true; + bool test __attribute__((unused)) = true; const std::wstring str_01(L"zuma beach"); const std::wstring str_02(L"montara and ocean beach"); diff --git a/libstdc++-v3/testsuite/21_strings/char_traits/typedefs/char/1.cc b/libstdc++-v3/testsuite/21_strings/char_traits/typedefs/char/1.cc index 4f2d061fb09..5d34aae4779 100644 --- a/libstdc++-v3/testsuite/21_strings/char_traits/typedefs/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/char_traits/typedefs/char/1.cc @@ -28,7 +28,7 @@ int main() // 21.1.3: char_traits<char>::int_type == int // dg-options -ansi -pedantic-err std::char_traits<char>::int_type* p = 0; - int* q = p; // dg-do compile + int* q __attribute__((unused)) = p; // dg-do compile return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/1.cc index fa285752871..1c46d583c41 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/1.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/1.cc @@ -29,7 +29,7 @@ void test01() typedef std::codecvt<char, char, mbstate_t> test_type; typedef std::locale::facet base_type; const test_type& obj = std::use_facet<test_type>(std::locale()); - const base_type* base = &obj; + const base_type* base __attribute__((unused)) = &obj; // Check for required typedefs typedef test_type::intern_type intern_type; diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/char/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/char/1.cc index 523322ece87..060b3683a52 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/char/1.cc @@ -31,16 +31,12 @@ void test01() typedef codecvt_base::result result; typedef codecvt<char, char, mbstate_t> c_codecvt; - bool test = true; - const char* c_lit = "black pearl jasmine tea"; - const char* from_next; + bool test __attribute__((unused)) = true; int size = 25; char* c_arr = new char[size]; char* c_ref = new char[size]; - char* to_next; locale loc = locale::classic(); - c_codecvt::state_type state; const c_codecvt* cvt = &use_facet<c_codecvt>(loc); // According to the resolution of DR19 (see also libstd++/9168), in diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/1.cc index 6b57c89232f..13fc3838c73 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/1.cc @@ -28,7 +28,7 @@ void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; typedef codecvt<wchar_t, char, mbstate_t> w_codecvt; locale loc; diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/2.cc index 1a933f8fd3b..da377b57a45 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/2.cc @@ -30,7 +30,7 @@ void test02() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; typedef codecvt<wchar_t, char, mbstate_t> w_codecvt; locale loc = __gnu_test::try_named_locale("en_US.ISO-8859-1"); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/3.cc index 9e98f53f88b..6830d301036 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/3.cc @@ -30,7 +30,7 @@ void test03() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; typedef codecvt<wchar_t, char, mbstate_t> w_codecvt; locale loc = __gnu_test::try_named_locale("en_US.ISO-8859-15"); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/4.cc index 0929676270f..ecb00753175 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/4.cc @@ -30,7 +30,7 @@ void test04() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; typedef codecvt<wchar_t, char, mbstate_t> w_codecvt; locale loc = __gnu_test::try_named_locale("en_US.UTF-8"); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/char/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/char/1.cc index 9ac07c5f044..76428bff180 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/char/1.cc @@ -31,16 +31,12 @@ void test01() typedef codecvt_base::result result; typedef codecvt<char, char, mbstate_t> c_codecvt; - bool test = true; - const char* c_lit = "black pearl jasmine tea"; - const char* from_next; + bool test __attribute__((unused)) = true; int size = 25; char* c_arr = new char[size]; char* c_ref = new char[size]; - char* to_next; locale loc = locale::classic(); - c_codecvt::state_type state; const c_codecvt* cvt = &use_facet<c_codecvt>(loc); // According to the resolution of DR19 (see also libstd++/9168), in diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/1.cc index d2fa938e892..1b86fb7a8dd 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/1.cc @@ -29,7 +29,7 @@ void test01() { using namespace std; typedef codecvt<wchar_t, char, mbstate_t> w_codecvt; - bool test = true; + bool test __attribute__((unused)) = true; locale loc_c = locale::classic(); const w_codecvt* cvt = &use_facet<w_codecvt>(loc_c); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/2.cc index c103b2e41c5..815cfd3ec28 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/2.cc @@ -31,7 +31,7 @@ void test02() { using namespace std; typedef codecvt<wchar_t, char, mbstate_t> w_codecvt; - bool test = true; + bool test __attribute__((unused)) = true; locale loc = __gnu_test::try_named_locale("en_US.ISO-8859-1"); locale::global(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/3.cc index 9cc921c7bce..d456868b85d 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/3.cc @@ -31,7 +31,7 @@ void test03() { using namespace std; typedef codecvt<wchar_t, char, mbstate_t> w_codecvt; - bool test = true; + bool test __attribute__((unused)) = true; locale loc = __gnu_test::try_named_locale("en_US.ISO-8859-15"); locale::global(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/4.cc index 68972e7ab32..d996797a8be 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/4.cc @@ -31,7 +31,7 @@ void test04() { using namespace std; typedef codecvt<wchar_t, char, mbstate_t> w_codecvt; - bool test = true; + bool test __attribute__((unused)) = true; locale loc = __gnu_test::try_named_locale("en_US.UTF-8"); locale::global(loc); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/char/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/char/1.cc index 71f6ac77498..bbc6397ce37 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/in/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/char/1.cc @@ -31,7 +31,7 @@ void test01() typedef codecvt_base::result result; typedef codecvt<char, char, mbstate_t> c_codecvt; - bool test = true; + bool test __attribute__((unused)) = true; const char* c_lit = "black pearl jasmine tea"; const char* from_next; int size = 25; diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/1.cc index d5a410a7741..d8c2e8fe42a 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/1.cc @@ -49,7 +49,7 @@ void test01() typedef char ext_type; typedef char_traits<wchar_t> int_traits; - bool test = true; + bool test __attribute__((unused)) = true; const ext_type* e_lit = "black pearl jasmine tea"; const ext_type* efrom_next; const int_type* i_lit = L"black pearl jasmine tea"; diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/2.cc index 51739b6ae3b..c1e025cff4b 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/2.cc @@ -49,7 +49,7 @@ void test02() typedef char ext_type; typedef char_traits<wchar_t> int_traits; - bool test = true; + bool test __attribute__((unused)) = true; const ext_type* e_lit = "\x1\x2\x3\x4\x5\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf\x10\x11\x12\x13" "\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20!\"#$%&" diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/3.cc index 118462d618b..361f2c7c418 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/3.cc @@ -49,7 +49,7 @@ void test03() typedef char ext_type; typedef char_traits<wchar_t> int_traits; - bool test = true; + bool test __attribute__((unused)) = true; const ext_type* e_lit = "\x1\x2\x3\x4\x5\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf\x10\x11\x12\x13" "\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20!\"#$%&" diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/4.cc index c08ee55efea..14b67284b8c 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/4.cc @@ -50,7 +50,7 @@ void test04() typedef char ext_type; typedef char_traits<wchar_t> int_traits; - bool test = true; + bool test __attribute__((unused)) = true; const ext_type* e_lit = "\x1\x2\x3\x4\x5\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf\x10\x11\x12\x13" "\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20!\"#$%&" diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/5.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/5.cc index ec65f60c692..aa0879d393d 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/5.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/5.cc @@ -50,7 +50,7 @@ void test05() typedef char ext_type; typedef char_traits<wchar_t> int_traits; - bool test = true; + bool test __attribute__((unused)) = true; const ext_type e_lit[] = { '\0', '\0', 'f', '\0' }; const ext_type* efrom_next; const int_type i_lit[] = { L'\0', L'\0', L'f', L'\0' }; diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/6.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/6.cc index 1be30323b8b..1eed2880dbc 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/6.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/6.cc @@ -50,7 +50,7 @@ void test06() typedef char ext_type; typedef char_traits<wchar_t> int_traits; - bool test = true; + bool test __attribute__((unused)) = true; const ext_type* e_lit = "black pearl jasmine tea"; const ext_type* efrom_next; const int_type* i_lit = L"black pearl jasmine tea"; diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/7.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/7.cc index 7d14ab4cfb5..8689be233fa 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/7.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/7.cc @@ -49,7 +49,7 @@ void test07() typedef char ext_type; typedef char_traits<wchar_t> int_traits; - bool test = true; + bool test __attribute__((unused)) = true; const ext_type* e_lit = "a\xc0\xff"; const ext_type* efrom_next; const int_type* i_lit = L"a"; diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/8.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/8.cc index 296f2eb3171..ee4d82bae63 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/8.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/8.cc @@ -49,7 +49,7 @@ void test08() typedef char ext_type; typedef char_traits<wchar_t> int_traits; - bool test = true; + bool test __attribute__((unused)) = true; const ext_type* e_lit = "\x1\x2\x3\x4\x5\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf\x10\x11\x12\x13" "\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20!\"#$%&" diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/9.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/9.cc index 7ba367b1327..ed6e68849a7 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/9.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/9.cc @@ -49,7 +49,7 @@ void test09() typedef char ext_type; typedef char_traits<wchar_t> int_traits; - bool test = true; + bool test __attribute__((unused)) = true; const ext_type* e_lit = "\x1\x2\x3\x4\x5\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf\x10\x11\x12\x13" "\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20!\"#$%&" @@ -118,7 +118,7 @@ void test09() // in w_codecvt::state_type state01; zero_state(state01); - result r1; + result r1 = codecvt_base::error; for (int i = 0; i <= esize; ++i) { diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/char/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/char/1.cc index 3ea244dcbb0..085952863c2 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/length/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/char/1.cc @@ -31,7 +31,7 @@ void test01() typedef codecvt_base::result result; typedef codecvt<char, char, mbstate_t> c_codecvt; - bool test = true; + bool test __attribute__((unused)) = true; const char* c_lit = "black pearl jasmine tea"; int size = 25; diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/char/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/char/2.cc index 6e0a7e96f2e..5e5023af850 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/length/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/char/2.cc @@ -49,7 +49,7 @@ void test02() typedef codecvt_base::result result; typedef codecvt<char, char, mbstate_t> c_codecvt; - bool test = true; + bool test __attribute__((unused)) = true; const char* c_lit = "black pearl jasmine tea"; int size = 25; diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/1.cc index 100de8567fc..bc228755a0d 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/1.cc @@ -44,7 +44,7 @@ void test01() typedef codecvt<wchar_t, char, mbstate_t> w_codecvt; typedef char ext_type; - bool test = true; + bool test __attribute__((unused)) = true; const ext_type* e_lit = "black pearl jasmine tea"; int size = strlen(e_lit); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/2.cc index 6f92b6ce093..a969ef61235 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/2.cc @@ -44,7 +44,7 @@ void test02() typedef codecvt<wchar_t, char, mbstate_t> w_codecvt; typedef char ext_type; - bool test = true; + bool test __attribute__((unused)) = true; const ext_type* e_lit = "\x1\x2\x3\x4\x5\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf\x10\x11\x12\x13" "\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20!\"#$%&" diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/3.cc index 8aec29d580b..3512e8ce265 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/3.cc @@ -44,7 +44,7 @@ void test03() typedef codecvt<wchar_t, char, mbstate_t> w_codecvt; typedef char ext_type; - bool test = true; + bool test __attribute__((unused)) = true; const ext_type* e_lit = "\x1\x2\x3\x4\x5\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf\x10\x11\x12\x13" "\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20!\"#$%&" diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/4.cc index 0b7b87c2643..ca742c30240 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/4.cc @@ -45,7 +45,7 @@ void test04() typedef wchar_t int_type; typedef char ext_type; - bool test = true; + bool test __attribute__((unused)) = true; const ext_type* e_lit = "\x1\x2\x3\x4\x5\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf\x10\x11\x12\x13" "\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20!\"#$%&" @@ -72,7 +72,6 @@ void test04() "\x80\x80\x80\xfc\x90\x80\x80\x80\x80\xfc\xa0\x80\x80\x80\x80" "\xfd\x80\x80\x80\x80\x80"; - const ext_type* efrom_next; const int_type i_lit[] = { 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/5.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/5.cc index 284233e7b6b..2921a9d9bfd 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/5.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/5.cc @@ -44,7 +44,7 @@ void test05() typedef codecvt<wchar_t, char, mbstate_t> w_codecvt; typedef char ext_type; - bool test = true; + bool test __attribute__((unused)) = true; const ext_type e_lit[] = { '\0', '\0', 'f', '\0' }; int size = sizeof(e_lit); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/6.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/6.cc index 76c151edf05..a0700c18920 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/6.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/6.cc @@ -62,7 +62,7 @@ void test06() typedef codecvt<wchar_t, char, mbstate_t> w_codecvt; typedef char ext_type; - bool test = true; + bool test __attribute__((unused)) = true; const ext_type* e_lit = "black pearl jasmine tea"; int size = strlen(e_lit); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/7.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/7.cc index 7d8ff4a1d80..5f35a0f2b1a 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/7.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/7.cc @@ -47,9 +47,8 @@ void test07() typedef wchar_t int_type; typedef char ext_type; - bool test = true; + bool test __attribute__((unused)) = true; const ext_type* e_lit = "a\xc0\xff"; - const ext_type* efrom_next; int size = strlen(e_lit); locale loc = __gnu_test::try_named_locale("en_US.UTF-8"); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/char/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/char/1.cc index 789007ae905..2880ec52636 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/char/1.cc @@ -31,16 +31,11 @@ void test01() typedef codecvt_base::result result; typedef codecvt<char, char, mbstate_t> c_codecvt; - bool test = true; - const char* c_lit = "black pearl jasmine tea"; - const char* from_next; + bool test __attribute__((unused)) = true; int size = 25; char* c_arr = new char[size]; char* c_ref = new char[size]; - char* to_next; - locale loc = locale::classic(); - c_codecvt::state_type state; const c_codecvt* cvt = &use_facet<c_codecvt>(loc); // According to the resolution of DR19 (see also libstd++/9168), in diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/1.cc index 5ecc99e0c6a..ad8cc24c60c 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/1.cc @@ -28,7 +28,7 @@ void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; typedef codecvt<wchar_t, char, mbstate_t> w_codecvt; locale loc_c = locale::classic(); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/2.cc index c99c823fbe2..57d471e7798 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/2.cc @@ -28,7 +28,7 @@ void test02() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; typedef codecvt<wchar_t, char, mbstate_t> w_codecvt; locale loc = __gnu_test::try_named_locale("en_US.ISO-8859-1"); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/3.cc index 27f67a4f117..229692b5f73 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/3.cc @@ -28,7 +28,7 @@ void test03() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; typedef codecvt<wchar_t, char, mbstate_t> w_codecvt; locale loc = __gnu_test::try_named_locale("en_US.ISO-8859-15"); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/4.cc index 8ab6828ddb5..7533e4c0659 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/4.cc @@ -28,7 +28,7 @@ void test04() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; typedef codecvt<wchar_t, char, mbstate_t> w_codecvt; locale loc = __gnu_test::try_named_locale("en_US.UTF-8"); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/char/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/char/1.cc index f0ef0a5da63..1dddbb207c7 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/out/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/out/char/1.cc @@ -31,7 +31,7 @@ void test01() typedef codecvt_base::result result; typedef codecvt<char, char, mbstate_t> c_codecvt; - bool test = true; + bool test __attribute__((unused)) = true; const char* c_lit = "black pearl jasmine tea"; const char* from_next; int size = 25; diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/1.cc index 82a57c6fdbd..75eb2ff0817 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/1.cc @@ -47,7 +47,7 @@ void test01() typedef char ext_type; typedef char_traits<char> ext_traits; - bool test = true; + bool test __attribute__((unused)) = true; const ext_type* e_lit = "black pearl jasmine tea"; const int_type* i_lit = L"black pearl jasmine tea"; const int_type* ifrom_next; diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/2.cc index ff413d5ac8a..cffff049c28 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/2.cc @@ -47,7 +47,7 @@ void test02() typedef char ext_type; typedef char_traits<char> ext_traits; - bool test = true; + bool test __attribute__((unused)) = true; const ext_type* e_lit = "\x1\x2\x3\x4\x5\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf\x10\x11\x12\x13" "\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20!\"#$%&" diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/3.cc index b1fa9fa4f22..c421488d1c4 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/3.cc @@ -47,7 +47,7 @@ void test03() typedef char ext_type; typedef char_traits<char> ext_traits; - bool test = true; + bool test __attribute__((unused)) = true; const ext_type* e_lit = "\x1\x2\x3\x4\x5\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf\x10\x11\x12\x13" "\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20!\"#$%&" diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/4.cc index 4fd193e3055..fabb941b021 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/4.cc @@ -47,7 +47,7 @@ void test04() typedef char ext_type; typedef char_traits<char> ext_traits; - bool test = true; + bool test __attribute__((unused)) = true; const ext_type* e_lit = "\x1\x2\x3\x4\x5\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf\x10\x11\x12\x13" "\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20!\"#$%&" diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/5.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/5.cc index 13ca4b28719..55ba7eff900 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/5.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/5.cc @@ -50,7 +50,7 @@ void test05() typedef char ext_type; typedef char_traits<char> ext_traits; - bool test = true; + bool test __attribute__((unused)) = true; const ext_type e_lit[] = { '\0', '\0', 'f', '\0' }; const int_type i_lit[] = { L'\0', L'\0', L'f', L'\0' }; const int_type* ifrom_next; diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/6.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/6.cc index 9ee2770bafd..a44746ff02d 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/6.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/6.cc @@ -50,7 +50,7 @@ void test06() typedef char ext_type; typedef char_traits<char> ext_traits; - bool test = true; + bool test __attribute__((unused)) = true; const ext_type* e_lit = "black pearl jasmine tea"; const int_type* i_lit = L"black pearl jasmine tea"; const int_type* ifrom_next; diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/7.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/7.cc index 3c069c8bb84..2a469c65c30 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/7.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/7.cc @@ -47,7 +47,7 @@ void test03() typedef char ext_type; typedef char_traits<char> ext_traits; - bool test = true; + bool test __attribute__((unused)) = true; const ext_type* e_lit = "a"; const int_type i_lit[] = { L'a', 0x20ac, 0x0 }; const int_type* ifrom_next; diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unicode/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unicode/1.cc index b1dc652d6d4..705f43afd6f 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/unicode/1.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/unicode/1.cc @@ -119,7 +119,7 @@ void test01() typedef __enc_traits enc_type; typedef codecvt<int_type, ext_type, enc_type> unicode_codecvt; - bool test = true; + bool test __attribute__((unused)) = true; const ext_type* e_lit = "black pearl jasmine tea"; int size = strlen(e_lit); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unicode/char.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unicode/char.cc index 1fa9648f5e8..ad31f9ae2fc 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/unicode/char.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/unicode/char.cc @@ -126,7 +126,7 @@ void test01() typedef char_traits<int_type> int_traits; typedef char_traits<ext_type> ext_traits; - bool test = true; + bool test __attribute__((unused)) = true; const ext_type* e_lit = "black pearl jasmine tea"; int size = strlen(e_lit); @@ -215,7 +215,7 @@ void test02() typedef char_traits<int_type> int_traits; typedef char_traits<ext_type> ext_traits; - bool test = true; + bool test __attribute__((unused)) = true; const ext_type* e_lit = "black pearl jasmine tea"; int size = strlen(e_lit); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unicode/wchar_t.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unicode/wchar_t.cc index 5f3d76cfe64..5793b33aa77 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/unicode/wchar_t.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/unicode/wchar_t.cc @@ -103,7 +103,7 @@ void test01() typedef char_traits<int_type> int_traits; typedef char_traits<ext_type> ext_traits; - bool test = true; + bool test __attribute__((unused)) = true; int size = 23; char e_lit_base[96] __attribute__((aligned(__alignof__(ext_type)))) = { @@ -155,8 +155,8 @@ void test01() unicode_codecvt::state_type state02("UCS-2BE", "UCS-4BE", 0, 0); initialize_state(state02); result r2 = cvt.out(state02, i_lit, i_lit + size, ifrom_next, - e_arr, e_arr + size, eto_next); - // XXX VERIFY( r2 == codecvt_base::ok ); + e_arr, e_arr + size, eto_next); + VERIFY( r2 == codecvt_base::ok ); // XXX? VERIFY( !ext_traits::compare(e_arr, e_lit, size) ); VERIFY( ifrom_next == i_lit + size ); VERIFY( eto_next == e_arr + size ); diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/1.cc index 1a6eadd82fe..25a36ef5ee9 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/1.cc @@ -31,7 +31,7 @@ void test01() typedef codecvt_base::result result; typedef codecvt<char, char, mbstate_t> c_codecvt; - bool test = true; + bool test __attribute__((unused)) = true; const char* c_lit = "black pearl jasmine tea"; const char* from_next; int size = 25; diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/1.cc index 65aaea05056..8410a358c4c 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/1.cc @@ -46,7 +46,7 @@ void test01() typedef wchar_t int_type; typedef char ext_type; - bool test = true; + bool test __attribute__((unused)) = true; const ext_type* e_lit = "black pearl jasmine tea"; int size = strlen(e_lit); ext_type* e_arr = new ext_type[size + 1]; diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/2.cc index a6d107cacb6..dce60f81a26 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/2.cc @@ -47,7 +47,7 @@ void test02() typedef char ext_type; typedef char_traits<char> ext_traits; - bool test = true; + bool test __attribute__((unused)) = true; const int_type* i_lit = L"\x1\x2\x3\x4\x5\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf\x10\x11\x12\x13" L"\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20!\"#$%&" diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/3.cc index 7ca700764c3..e327ef86731 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/3.cc @@ -47,7 +47,7 @@ void test03() typedef char ext_type; typedef char_traits<char> ext_traits; - bool test = true; + bool test __attribute__((unused)) = true; const int_type i_lit[] = { 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/4.cc index 234a4b63f46..d4dc56051af 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/4.cc @@ -47,7 +47,7 @@ void test04() typedef char ext_type; typedef char_traits<char> ext_traits; - bool test = true; + bool test __attribute__((unused)) = true; const int_type i_lit[] = { 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, diff --git a/libstdc++-v3/testsuite/22_locale/collate/1.cc b/libstdc++-v3/testsuite/22_locale/collate/1.cc index 5b55b03f24f..2f6415fcd67 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/1.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/1.cc @@ -29,7 +29,7 @@ void test01() typedef std::messages<char> test_type; typedef std::locale::facet base_type; const test_type& obj = std::use_facet<test_type>(std::locale()); - const base_type* base = &obj; + const base_type* base __attribute__((unused)) = &obj; // Check for required typedefs typedef test_type::char_type char_type; diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/char/1.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/char/1.cc index 42469aea514..62e9510d368 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/compare/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/compare/char/1.cc @@ -29,7 +29,7 @@ void test01() using namespace std; typedef std::collate<char>::string_type string_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); @@ -43,9 +43,6 @@ void test01() // cache the collate facets const collate<char>& coll_c = use_facet<collate<char> >(loc_c); - const collate<char>& coll_us = use_facet<collate<char> >(loc_us); - const collate<char>& coll_fr = use_facet<collate<char> >(loc_fr); - const collate<char>& coll_de = use_facet<collate<char> >(loc_de); // int compare(const charT*, const charT*, const charT*, const charT*) const diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/char/2.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/char/2.cc index b6f944949a3..d0bad93196b 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/compare/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/compare/char/2.cc @@ -29,7 +29,7 @@ void test02() using namespace std; typedef std::collate<char>::string_type string_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); @@ -42,22 +42,17 @@ void test02() VERIFY( loc_de != loc_fr ); // cache the collate facets - const collate<char>& coll_c = use_facet<collate<char> >(loc_c); - const collate<char>& coll_us = use_facet<collate<char> >(loc_us); - const collate<char>& coll_fr = use_facet<collate<char> >(loc_fr); const collate<char>& coll_de = use_facet<collate<char> >(loc_de); // int compare(const charT*, const charT*, const charT*, const charT*) const const char* strlit1 = "monkey picked tikuanyin oolong"; - const char* strlit2 = "imperial tea court green oolong"; const char* strlit3 = "Äuglein Augment"; // "C" == "Augment Äuglein" const char* strlit4 = "Base baß Baß Bast"; // "C" == "Base baß Baß Bast" int i1; int i2; int size1 = char_traits<char>::length(strlit1) - 1; - int size2 = char_traits<char>::length(strlit2) - 1; int size3 = char_traits<char>::length(strlit3) - 1; int size4 = char_traits<char>::length(strlit4) - 1; diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/char/3.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/char/3.cc index 6712832294c..7de98aa7925 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/compare/char/3.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/compare/char/3.cc @@ -29,7 +29,7 @@ void test03() using namespace std; typedef std::collate<char>::string_type string_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/1.cc index c1825e2bbf2..995c5b4f699 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/1.cc @@ -29,7 +29,7 @@ void test01() using namespace std; typedef std::collate<wchar_t>::string_type string_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); @@ -43,9 +43,6 @@ void test01() // cache the collate facets const collate<wchar_t>& coll_c = use_facet<collate<wchar_t> >(loc_c); - const collate<wchar_t>& coll_us = use_facet<collate<wchar_t> >(loc_us); - const collate<wchar_t>& coll_fr = use_facet<collate<wchar_t> >(loc_fr); - const collate<wchar_t>& coll_de = use_facet<collate<wchar_t> >(loc_de); // int compare(const charT*, const charT*, const charT*, const charT*) const diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/2.cc index 8d813abde3d..fd4aee7a016 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/2.cc @@ -33,7 +33,7 @@ void test02() using namespace std; typedef std::collate<wchar_t>::string_type string_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); @@ -46,22 +46,17 @@ void test02() VERIFY( loc_de != loc_fr ); // cache the collate facets - const collate<wchar_t>& coll_c = use_facet<collate<wchar_t> >(loc_c); - const collate<wchar_t>& coll_us = use_facet<collate<wchar_t> >(loc_us); - const collate<wchar_t>& coll_fr = use_facet<collate<wchar_t> >(loc_fr); const collate<wchar_t>& coll_de = use_facet<collate<wchar_t> >(loc_de); // int compare(const charT*, const charT*, const charT*, const charT*) const const wchar_t* strlit1 = L"monkey picked tikuanyin oolong"; - const wchar_t* strlit2 = L"imperial tea court green oolong"; const wchar_t* strlit3 = L"Äuglein Augment"; // "C" == "Augment Äuglein" const wchar_t* strlit4 = L"Base baß Baß Bast"; // "C" == "Base baß Baß Bast" int i1; int i2; int size1 = char_traits<wchar_t>::length(strlit1) - 1; - int size2 = char_traits<wchar_t>::length(strlit2) - 1; int size3 = char_traits<wchar_t>::length(strlit3) - 1; int size4 = char_traits<wchar_t>::length(strlit4) - 1; diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/3.cc index c4b87bad068..209f7f835e3 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/3.cc @@ -29,7 +29,7 @@ void test03() using namespace std; typedef std::collate<wchar_t>::string_type string_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); diff --git a/libstdc++-v3/testsuite/22_locale/collate/hash/char/1.cc b/libstdc++-v3/testsuite/22_locale/collate/hash/char/1.cc index 9be618a8f4a..e8d9d8ef0a1 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/hash/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/hash/char/1.cc @@ -26,7 +26,7 @@ // Check "C" locale. void test01() { - bool test = true; + bool test __attribute__((unused)) = true; std::string str1("fffff"); std::string str2("ffffffffffff"); diff --git a/libstdc++-v3/testsuite/22_locale/collate/hash/char/2.cc b/libstdc++-v3/testsuite/22_locale/collate/hash/char/2.cc index 6ef1bedbb08..236d21e128d 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/hash/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/hash/char/2.cc @@ -29,7 +29,7 @@ void test02() using namespace std; typedef std::collate<char>::string_type string_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); @@ -42,19 +42,12 @@ void test02() VERIFY( loc_de != loc_fr ); // cache the collate facets - const collate<char>& coll_c = use_facet<collate<char> >(loc_c); - const collate<char>& coll_us = use_facet<collate<char> >(loc_us); - const collate<char>& coll_fr = use_facet<collate<char> >(loc_fr); const collate<char>& coll_de = use_facet<collate<char> >(loc_de); // long hash(const charT*, const charT*) cosnt - const char* strlit1 = "monkey picked tikuanyin oolong"; - const char* strlit2 = "imperial tea court green oolong"; const char* strlit3 = "Äuglein Augment"; // "C" == "Augment Äuglein" const char* strlit4 = "Base baß Baß Bast"; // "C" == "Base baß Baß Bast" - int i1; - int i2; long l1; long l2; int size3 = char_traits<char>::length(strlit4) - 1; diff --git a/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/1.cc index 73f8da142ca..fad5848e46d 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/1.cc @@ -28,7 +28,7 @@ void test01() { using namespace std; typedef std::collate<wchar_t>::string_type string_type; - bool test = true; + bool test __attribute__((unused)) = true; string_type str1(L"fffff"); string_type str2(L"ffffffffffff"); diff --git a/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/2.cc index 2347e0469b2..28018032227 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/2.cc @@ -32,7 +32,7 @@ void test02() { using namespace std; typedef std::collate<wchar_t>::string_type string_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); @@ -45,19 +45,12 @@ void test02() VERIFY( loc_de != loc_fr ); // cache the collate facets - const collate<wchar_t>& coll_c = use_facet<collate<wchar_t> >(loc_c); - const collate<wchar_t>& coll_us = use_facet<collate<wchar_t> >(loc_us); - const collate<wchar_t>& coll_fr = use_facet<collate<wchar_t> >(loc_fr); const collate<wchar_t>& coll_de = use_facet<collate<wchar_t> >(loc_de); // long hash(const charT*, const charT*) cosnt - const wchar_t* strlit1 = L"monkey picked tikuanyin oolong"; - const wchar_t* strlit2 = L"imperial tea court green oolong"; const wchar_t* strlit3 = L"Äuglein Augment"; // "C" == "Augment Äuglein" const wchar_t* strlit4 = L"Base baß Baß Bast"; // "C" == "Base baß Baß Bast" - int i1; - int i2; long l1; long l2; int size3 = char_traits<wchar_t>::length(strlit4) - 1; diff --git a/libstdc++-v3/testsuite/22_locale/collate/transform/char/2.cc b/libstdc++-v3/testsuite/22_locale/collate/transform/char/2.cc index 679a4b0c8fd..9dfc00ffaf4 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/transform/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/transform/char/2.cc @@ -28,7 +28,7 @@ void test02() using namespace std; typedef std::collate<char>::string_type string_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); @@ -41,14 +41,9 @@ void test02() VERIFY( loc_de != loc_fr ); // cache the collate facets - const collate<char>& coll_c = use_facet<collate<char> >(loc_c); - const collate<char>& coll_us = use_facet<collate<char> >(loc_us); - const collate<char>& coll_fr = use_facet<collate<char> >(loc_fr); const collate<char>& coll_de = use_facet<collate<char> >(loc_de); // long hash(const charT*, const charT*) cosnt - const char* strlit1 = "monkey picked tikuanyin oolong"; - const char* strlit2 = "imperial tea court green oolong"; const char* strlit3 = "Äuglein Augment"; // "C" == "Augment Äuglein" const char* strlit4 = "Base baß Baß Bast"; // "C" == "Base baß Baß Bast" diff --git a/libstdc++-v3/testsuite/22_locale/collate/transform/char/3.cc b/libstdc++-v3/testsuite/22_locale/collate/transform/char/3.cc index c82d97cfa85..dab1f081b0d 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/transform/char/3.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/transform/char/3.cc @@ -28,7 +28,7 @@ void test03() using namespace std; typedef std::collate<char>::string_type string_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); diff --git a/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/2.cc index 4943ba0b7d5..d21d3996492 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/2.cc @@ -32,7 +32,7 @@ void test02() using namespace std; typedef std::collate<wchar_t>::string_type string_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); @@ -45,14 +45,9 @@ void test02() VERIFY( loc_de != loc_fr ); // cache the collate facets - const collate<wchar_t>& coll_c = use_facet<collate<wchar_t> >(loc_c); - const collate<wchar_t>& coll_us = use_facet<collate<wchar_t> >(loc_us); - const collate<wchar_t>& coll_fr = use_facet<collate<wchar_t> >(loc_fr); const collate<wchar_t>& coll_de = use_facet<collate<wchar_t> >(loc_de); // long hash(const charT*, const charT*) cosnt - const wchar_t* strlit1 = L"monkey picked tikuanyin oolong"; - const wchar_t* strlit2 = L"imperial tea court green oolong"; const wchar_t* strlit3 = L"Äuglein Augment"; // "C" == "Augment Äuglein" const wchar_t* strlit4 = L"Base baß Baß Bast"; // "C" == "Base baß Baß Bast" diff --git a/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/3.cc index 583d747145a..fdd88f70885 100644 --- a/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/3.cc @@ -28,7 +28,7 @@ void test03() using namespace std; typedef std::collate<wchar_t>::string_type string_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); diff --git a/libstdc++-v3/testsuite/22_locale/collate_byname/1.cc b/libstdc++-v3/testsuite/22_locale/collate_byname/1.cc index f650be796a0..be4524f9ca6 100644 --- a/libstdc++-v3/testsuite/22_locale/collate_byname/1.cc +++ b/libstdc++-v3/testsuite/22_locale/collate_byname/1.cc @@ -28,7 +28,7 @@ void test01() using namespace std; typedef std::collate<char>::string_type string_type; - bool test = true; + bool test __attribute__((unused)) = true; string str; locale loc_c = locale::classic(); @@ -41,7 +41,6 @@ void test01() VERIFY( loc_de != loc_byname ); // cache the collate facets - const collate<char>& coll_byname = use_facet<collate<char> >(loc_byname); const collate<char>& coll_de = use_facet<collate<char> >(loc_de); // Check German "de_DE" locale. diff --git a/libstdc++-v3/testsuite/22_locale/ctype/1.cc b/libstdc++-v3/testsuite/22_locale/ctype/1.cc index 541f2b9c237..adda6fd548d 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/1.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/1.cc @@ -141,14 +141,15 @@ test01() ctype_base::mask m01; ctype_base::mask m02; - + ctype_base::mask res; + m01 = ctype_base::space; m02 = ctype_base::xdigit; - m01 & m02; - m01 | m02; - m01 ^ m02; - ~m01; + res = m01 & m02; + res = m01 | m02; + res = m01 ^ m02; + res = ~m01; m01 &= m02; m01 |= m02; m01 ^= m02; diff --git a/libstdc++-v3/testsuite/22_locale/ctype/cons/char/1.cc b/libstdc++-v3/testsuite/22_locale/ctype/cons/char/1.cc index 4846aec220e..d21ee946d7a 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/cons/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/cons/char/1.cc @@ -51,7 +51,7 @@ public: void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; comma_ctype obj; const ctype_base::mask* tmp = obj.get_classic_table(); diff --git a/libstdc++-v3/testsuite/22_locale/ctype/is/char/1.cc b/libstdc++-v3/testsuite/22_locale/ctype/is/char/1.cc index 8e80fd2fb96..523044f6d32 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/is/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/is/char/1.cc @@ -35,10 +35,9 @@ class gnu_ctype: public std::ctype<char_type> { }; void test01() { - bool test = true; + bool test __attribute__((unused)) = true; const char_type strlit00[] = "manilla, cebu, tandag PHILIPPINES"; const char_type strlit01[] = "MANILLA, CEBU, TANDAG PHILIPPINES"; - const char_type strlit02[] = "manilla, cebu, tandag philippines"; const char_type c00 = 'S'; const char_type c10 = 's'; const char_type c20 = '9'; @@ -46,13 +45,9 @@ void test01() const char_type c40 = '!'; const char_type c50 = 'F'; const char_type c60 = 'f'; - const char_type c70 = 'X'; const char_type c80 = 'x'; gnu_ctype gctype; - char_type c100; - int len = std::char_traits<char_type>::length(strlit00); - char_type c_array[len + 1]; // sanity check ctype_base::mask members int i01 = std::ctype_base::space; @@ -66,7 +61,6 @@ void test01() int i09 = std::ctype_base::graph; int i10 = std::ctype_base::print; int i11 = std::ctype_base::cntrl; - int i12 = sizeof(std::ctype_base::mask); VERIFY ( i01 != i02); VERIFY ( i02 != i03); VERIFY ( i03 != i04); diff --git a/libstdc++-v3/testsuite/22_locale/ctype/is/char/2.cc b/libstdc++-v3/testsuite/22_locale/ctype/is/char/2.cc index 89be53dd3f0..0211607de8f 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/is/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/is/char/2.cc @@ -41,7 +41,7 @@ void test02() typedef ctype_base::mask mask; typedef vector<mask> vector_type; - bool test = true; + bool test __attribute__((unused)) = true; // const int max = numeric_limits<char>::max(); const int max = 255; diff --git a/libstdc++-v3/testsuite/22_locale/ctype/is/char/3.cc b/libstdc++-v3/testsuite/22_locale/ctype/is/char/3.cc index 0b56b5ca3b0..9ddeadb1f03 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/is/char/3.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/is/char/3.cc @@ -35,7 +35,7 @@ typedef char char_type; // Per Liboriussen <liborius@stofanet.dk> void test03() { - bool test = true; + bool test __attribute__((unused)) = true; std::ctype_base::mask maskdata[256]; for (int i = 0; i < 256; ++i) maskdata[i] = std::ctype_base::alpha; diff --git a/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/1.cc index ff115d2cdbe..29fdfe97c7e 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/1.cc @@ -35,10 +35,9 @@ class gnu_ctype: public std::ctype<char_type> { }; void test01() { - bool test = true; + bool test __attribute__((unused)) = true; const char_type strlit00[] = L"manilla, cebu, tandag PHILIPPINES"; const char_type strlit01[] = L"MANILLA, CEBU, TANDAG PHILIPPINES"; - const char_type strlit02[] = L"manilla, cebu, tandag philippines"; const char_type c00 = L'S'; const char_type c10 = L's'; const char_type c20 = L'9'; @@ -46,13 +45,9 @@ void test01() const char_type c40 = L'!'; const char_type c50 = L'F'; const char_type c60 = L'f'; - const char_type c70 = L'X'; const char_type c80 = L'x'; gnu_ctype gctype; - char_type c100; - int len = std::char_traits<char_type>::length(strlit00); - char_type c_array[len + 1]; // sanity check ctype_base::mask members int i01 = std::ctype_base::space; @@ -66,7 +61,6 @@ void test01() int i09 = std::ctype_base::graph; int i10 = std::ctype_base::print; int i11 = std::ctype_base::cntrl; - int i12 = sizeof(std::ctype_base::mask); VERIFY ( i01 != i02); VERIFY ( i02 != i03); VERIFY ( i03 != i04); @@ -100,7 +94,6 @@ void test01() std::ctype_base::mask m02[13]; const char_type* cc0 = strlit00; const char_type* cc1 = NULL; - const char_type* cc2 = NULL; cc0 = strlit00; m01[0] = m00; diff --git a/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/2.cc index c9eb1e0b2a4..df028783f85 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/2.cc @@ -41,7 +41,7 @@ void test02() typedef ctype_base::mask mask; typedef vector<mask> vector_type; - bool test = true; + bool test __attribute__((unused)) = true; // const int max = numeric_limits<char>::max(); const int max = 255; diff --git a/libstdc++-v3/testsuite/22_locale/ctype/narrow/char/1.cc b/libstdc++-v3/testsuite/22_locale/ctype/narrow/char/1.cc index bbe0c2eadf0..6643803a1a1 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/narrow/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/narrow/char/1.cc @@ -39,7 +39,7 @@ void test01() using namespace std; typedef char wide_type; - bool test = true; + bool test __attribute__((unused)) = true; const char dfault = '?'; const locale loc_c = locale::classic(); const ctype<wide_type>& ctype_c = use_facet<ctype<wide_type> >(loc_c); @@ -49,7 +49,7 @@ void test01() vector<char> narrow_chars(wide.length() + 1); // narrow(charT c, char dfault) const - for (int i = 0; i < wide.length(); ++i) + for (size_t i = 0; i < wide.length(); ++i) { char c = ctype_c.narrow(wide[i], dfault); VERIFY( c == narrow[i] ); @@ -58,7 +58,7 @@ void test01() // narrow(const charT* low, const charT* high, char dfault, char* dest) const ctype_c.narrow(&wide[0], &wide[0] + wide.length(), dfault, &narrow_chars[0]); VERIFY( narrow_chars[0] != dfault ); - for (int i = 0; i < wide.length(); ++i) + for (size_t i = 0; i < wide.length(); ++i) VERIFY( narrow_chars[i] == narrow[i] ); } diff --git a/libstdc++-v3/testsuite/22_locale/ctype/narrow/char/2.cc b/libstdc++-v3/testsuite/22_locale/ctype/narrow/char/2.cc index aa3ff4c70bc..1f0e1619afc 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/narrow/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/narrow/char/2.cc @@ -38,7 +38,7 @@ void test02() using namespace std; typedef char wide_type; - bool test = true; + bool test __attribute__((unused)) = true; const char dfault = '?'; const locale loc_c = locale::classic(); const ctype<wide_type>& ctype_c = use_facet<ctype<wide_type> >(loc_c); @@ -53,7 +53,7 @@ void test02() vector<char> narrow_chars(wide.length() + 1); // narrow(charT c, char dfault) const - for (int i = 0; i < wide.length(); ++i) + for (size_t i = 0; i < wide.length(); ++i) { char c = ctype_c.narrow(wide[i], dfault); VERIFY( c == narrow[i] ); @@ -62,7 +62,7 @@ void test02() // narrow(const charT* low, const charT* high, char dfault, char* dest) const ctype_c.narrow(&wide[0], &wide[0] + wide.length(), dfault, &narrow_chars[0]); VERIFY( narrow_chars[0] != dfault ); - for (int i = 0; i < wide.length(); ++i) + for (size_t i = 0; i < wide.length(); ++i) VERIFY( narrow_chars[i] == narrow[i] ); } diff --git a/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/1.cc index 459dcf7db57..a9d30f44cc2 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/1.cc @@ -39,7 +39,7 @@ void test01() using namespace std; typedef wchar_t wide_type; - bool test = true; + bool test __attribute__((unused)) = true; const char dfault = '?'; const locale loc_c = locale::classic(); const ctype<wide_type>& ctype_c = use_facet<ctype<wide_type> >(loc_c); @@ -49,7 +49,7 @@ void test01() vector<char> narrow_chars(wide.length() + 1); // narrow(charT c, char dfault) const - for (int i = 0; i < wide.length(); ++i) + for (size_t i = 0; i < wide.length(); ++i) { char c = ctype_c.narrow(wide[i], dfault); VERIFY( c == narrow[i] ); @@ -58,7 +58,7 @@ void test01() // narrow(const charT* low, const charT* high, char dfault, char* dest) const ctype_c.narrow(&wide[0], &wide[0] + wide.length(), dfault, &narrow_chars[0]); VERIFY( narrow_chars[0] != dfault ); - for (int i = 0; i < wide.length(); ++i) + for (size_t i = 0; i < wide.length(); ++i) VERIFY( narrow_chars[i] == narrow[i] ); } diff --git a/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/2.cc index 8f8fecc6ea9..5422a5685a9 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/2.cc @@ -38,7 +38,7 @@ void test02() using namespace std; typedef wchar_t wide_type; - bool test = true; + bool test __attribute__((unused)) = true; const char dfault = '?'; const locale loc_c = locale::classic(); const ctype<wide_type>& ctype_c = use_facet<ctype<wide_type> >(loc_c); @@ -53,7 +53,7 @@ void test02() vector<char> narrow_chars(wide.length() + 1); // narrow(charT c, char dfault) const - for (int i = 0; i < wide.length(); ++i) + for (size_t i = 0; i < wide.length(); ++i) { char c = ctype_c.narrow(wide[i], dfault); VERIFY( c == narrow[i] ); @@ -62,7 +62,7 @@ void test02() // narrow(const charT* low, const charT* high, char dfault, char* dest) const ctype_c.narrow(&wide[0], &wide[0] + wide.length(), dfault, &narrow_chars[0]); VERIFY( narrow_chars[0] != dfault ); - for (int i = 0; i < wide.length(); ++i) + for (size_t i = 0; i < wide.length(); ++i) VERIFY( narrow_chars[i] == narrow[i] ); } diff --git a/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/3.cc index ac3b436f590..1e00a840a2b 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/3.cc @@ -36,7 +36,7 @@ void test03() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; locale loc = __gnu_test::try_named_locale("se_NO.UTF-8"); const ctype<wchar_t>& wct = use_facet<ctype<wchar_t> >(loc); diff --git a/libstdc++-v3/testsuite/22_locale/ctype/scan/char/1.cc b/libstdc++-v3/testsuite/22_locale/ctype/scan/char/1.cc index 6e8d1d31e26..86ca5cc2f01 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/scan/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/scan/char/1.cc @@ -50,7 +50,7 @@ class gnu_ctype: public std::ctype<char_type> { }; // Sanity check scan_is() and scan_not(). void test01() { - bool test = true; + bool test __attribute__((unused)) = true; const char_type *const ca = "aaaaa"; const char_type *const cz = "zzzzz"; diff --git a/libstdc++-v3/testsuite/22_locale/ctype/scan/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/ctype/scan/wchar_t/1.cc index afe99f378b7..dead79ea2f6 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/scan/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/scan/wchar_t/1.cc @@ -51,7 +51,7 @@ class gnu_ctype: public std::ctype<char_type> { }; // Sanity check scan_is() and scan_not(). void test01() { - bool test = true; + bool test __attribute__((unused)) = true; const char_type *const ca = L"aaaaa"; const char_type *const cz = L"zzzzz"; diff --git a/libstdc++-v3/testsuite/22_locale/ctype/to/char/1.cc b/libstdc++-v3/testsuite/22_locale/ctype/to/char/1.cc index a337d8e5ed4..504eb89d540 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/to/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/to/char/1.cc @@ -35,19 +35,12 @@ class gnu_ctype: public std::ctype<char_type> { }; void test01() { - bool test = true; + bool test __attribute__((unused)) = true; const char_type strlit00[] = "manilla, cebu, tandag PHILIPPINES"; const char_type strlit01[] = "MANILLA, CEBU, TANDAG PHILIPPINES"; const char_type strlit02[] = "manilla, cebu, tandag philippines"; const char_type c00 = 'S'; const char_type c10 = 's'; - const char_type c20 = '9'; - const char_type c30 = ' '; - const char_type c40 = '!'; - const char_type c50 = 'F'; - const char_type c60 = 'f'; - const char_type c70 = 'X'; - const char_type c80 = 'x'; gnu_ctype gctype; char_type c100; @@ -66,7 +59,6 @@ void test01() int i09 = std::ctype_base::graph; int i10 = std::ctype_base::print; int i11 = std::ctype_base::cntrl; - int i12 = sizeof(std::ctype_base::mask); VERIFY ( i01 != i02); VERIFY ( i02 != i03); VERIFY ( i03 != i04); diff --git a/libstdc++-v3/testsuite/22_locale/ctype/to/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/ctype/to/wchar_t/1.cc index 9f042abc438..9d446c791ca 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/to/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/to/wchar_t/1.cc @@ -35,19 +35,12 @@ class gnu_ctype: public std::ctype<char_type> { }; void test01() { - bool test = true; + bool test __attribute__((unused)) = true; const char_type strlit00[] = L"manilla, cebu, tandag PHILIPPINES"; const char_type strlit01[] = L"MANILLA, CEBU, TANDAG PHILIPPINES"; const char_type strlit02[] = L"manilla, cebu, tandag philippines"; const char_type c00 = L'S'; const char_type c10 = L's'; - const char_type c20 = L'9'; - const char_type c30 = L' '; - const char_type c40 = L'!'; - const char_type c50 = L'F'; - const char_type c60 = L'f'; - const char_type c70 = L'X'; - const char_type c80 = L'x'; gnu_ctype gctype; char_type c100; @@ -66,7 +59,6 @@ void test01() int i09 = std::ctype_base::graph; int i10 = std::ctype_base::print; int i11 = std::ctype_base::cntrl; - int i12 = sizeof(std::ctype_base::mask); VERIFY ( i01 != i02); VERIFY ( i02 != i03); VERIFY ( i03 != i04); diff --git a/libstdc++-v3/testsuite/22_locale/ctype/widen/char/1.cc b/libstdc++-v3/testsuite/22_locale/ctype/widen/char/1.cc index f7a2c15ad86..e4ac43ab6cf 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/widen/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/widen/char/1.cc @@ -38,8 +38,7 @@ void test01() using namespace std; typedef char wide_type; - bool test = true; - const char dfault = '?'; + bool test __attribute__((unused)) = true; const locale loc_c = locale::classic(); const ctype<wide_type>& ctype_c = use_facet<ctype<wide_type> >(loc_c); @@ -48,7 +47,7 @@ void test01() vector<wide_type> wide_chars(narrow.length() + 1); // widen(char c) const - for (int i = 0; i < narrow.length(); ++i) + for (size_t i = 0; i < narrow.length(); ++i) { char c = ctype_c.widen(narrow[i]); VERIFY( c == wide[i] ); @@ -56,7 +55,7 @@ void test01() // widen(const char* low, const char* high, charT* dest) const ctype_c.widen(&narrow[0], &narrow[0] + narrow.length(), &wide_chars[0]); - for (int i = 0; i < narrow.length(); ++i) + for (size_t i = 0; i < narrow.length(); ++i) VERIFY( wide_chars[i] == wide[i] ); } diff --git a/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/1.cc index 042a0b5f705..7e2377475e0 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/1.cc @@ -38,8 +38,7 @@ void test01() using namespace std; typedef wchar_t wide_type; - bool test = true; - const char dfault = '?'; + bool test __attribute__((unused)) = true; const locale loc_c = locale::classic(); const ctype<wide_type>& ctype_c = use_facet<ctype<wide_type> >(loc_c); @@ -48,7 +47,7 @@ void test01() vector<wide_type> wide_chars(narrow.length() + 1); // widen(char c) const - for (int i = 0; i < narrow.length(); ++i) + for (size_t i = 0; i < narrow.length(); ++i) { char c = ctype_c.widen(narrow[i]); VERIFY( c == wide[i] ); @@ -56,7 +55,7 @@ void test01() // widen(const char* low, const char* high, charT* dest) const ctype_c.widen(&narrow[0], &narrow[0] + narrow.length(), &wide_chars[0]); - for (int i = 0; i < narrow.length(); ++i) + for (size_t i = 0; i < narrow.length(); ++i) VERIFY( wide_chars[i] == wide[i] ); } diff --git a/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/2.cc index 6f9dec45d3c..0cb05dd930a 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/2.cc @@ -36,7 +36,7 @@ void test02() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; locale loc = __gnu_test::try_named_locale("en_US.ISO-8859-1"); const ctype<wchar_t>& wct = use_facet<ctype<wchar_t> >(loc); diff --git a/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/3.cc index d9b32b0a6cb..8d6f1f3c7ae 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/3.cc @@ -36,7 +36,7 @@ void test03() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; locale loc = __gnu_test::try_named_locale("se_NO.UTF-8"); const ctype<wchar_t>& wct = use_facet<ctype<wchar_t> >(loc); diff --git a/libstdc++-v3/testsuite/22_locale/facet/1.cc b/libstdc++-v3/testsuite/22_locale/facet/1.cc index f93265bd7d1..83609561cc3 100644 --- a/libstdc++-v3/testsuite/22_locale/facet/1.cc +++ b/libstdc++-v3/testsuite/22_locale/facet/1.cc @@ -172,7 +172,7 @@ std::locale::id gnu_facet::id; void test01() { - bool test = true; + bool test __attribute__((unused)) = true; const std::string name_no("*"); const std::string name_c("C"); diff --git a/libstdc++-v3/testsuite/22_locale/facet/2.cc b/libstdc++-v3/testsuite/22_locale/facet/2.cc index 844eb7b3d24..f3059ee05b7 100644 --- a/libstdc++-v3/testsuite/22_locale/facet/2.cc +++ b/libstdc++-v3/testsuite/22_locale/facet/2.cc @@ -46,7 +46,7 @@ typedef surf facet_type; void test02() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; // 1: Destroyed when out of scope. VERIFY( counter == 0 ); diff --git a/libstdc++-v3/testsuite/22_locale/global_templates/1.cc b/libstdc++-v3/testsuite/22_locale/global_templates/1.cc index 49886aa18bf..c82c4d3c77f 100644 --- a/libstdc++-v3/testsuite/22_locale/global_templates/1.cc +++ b/libstdc++-v3/testsuite/22_locale/global_templates/1.cc @@ -32,7 +32,7 @@ void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; // construct a locale object with the C facet const locale& cloc = locale::classic(); @@ -45,17 +45,17 @@ void test01() VERIFY( has_facet<gnu_codecvt>(loc) ); try - { const ccodecvt& cvt01 = use_facet<ccodecvt>(cloc); } + { const ccodecvt& cvt01 __attribute__((unused)) = use_facet<ccodecvt>(cloc); } catch(...) { VERIFY( false ); } try - { const gnu_codecvt& cvt02 = use_facet<gnu_codecvt>(loc); } + { const gnu_codecvt& cvt02 __attribute__((unused)) = use_facet<gnu_codecvt>(loc); } catch(...) { VERIFY( false ); } try - { const ccodecvt& cvt03 = use_facet<gnu_codecvt>(cloc); } + { const ccodecvt& cvt03 __attribute__((unused)) = use_facet<gnu_codecvt>(cloc); } catch(bad_cast& obj) { VERIFY( true ); } catch(...) diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/2.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/2.cc index e49756f18fd..af51d3313d6 100644 --- a/libstdc++-v3/testsuite/22_locale/locale/cons/2.cc +++ b/libstdc++-v3/testsuite/22_locale/locale/cons/2.cc @@ -110,7 +110,7 @@ void test01() typedef __enc_traits enc_type; typedef codecvt<int_type, ext_type, enc_type> unicode_codecvt; - bool test = true; + bool test __attribute__((unused)) = true; string str1, str2; // construct a locale object with the C facet diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/4.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/4.cc index e450441816e..9343535a8ad 100644 --- a/libstdc++-v3/testsuite/22_locale/locale/cons/4.cc +++ b/libstdc++-v3/testsuite/22_locale/locale/cons/4.cc @@ -28,7 +28,7 @@ // libstdc++/7811 void test03() { - bool test = true; + bool test __attribute__((unused)) = true; #ifdef _GLIBCXX_HAVE_SETENV const char* LC_ALL_orig = getenv("LC_ALL"); if (!setenv("LC_ALL", "it_IT", 1)) diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/5.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/5.cc index 5492a0ce723..697b4a49c67 100644 --- a/libstdc++-v3/testsuite/22_locale/locale/cons/5.cc +++ b/libstdc++-v3/testsuite/22_locale/locale/cons/5.cc @@ -28,7 +28,7 @@ // More tests for locale("") == POSIX locale::name. void test04() { - bool test = true; + bool test __attribute__((unused)) = true; using namespace std; #ifdef _GLIBCXX_HAVE_SETENV diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/6.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/6.cc index 6b11ac1e9a1..07682e5b60a 100644 --- a/libstdc++-v3/testsuite/22_locale/locale/cons/6.cc +++ b/libstdc++-v3/testsuite/22_locale/locale/cons/6.cc @@ -29,7 +29,7 @@ void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; const string name_c("C"); const string str_unnamed("*"); string str; @@ -46,10 +46,6 @@ test01() VERIFY( has_facet<numpunct<char> >(loc_1) ); VERIFY( has_facet<numpunct<char> >(loc_c) ); - // extract facet - const numpunct<char>& f_nump_1 = use_facet<numpunct<char> >(loc_1); - const numpunct<char>& f_nump_c = use_facet<numpunct<char> >(loc_c); - // attempt to re-synthesize classic locale locale loc_2 = loc_1.combine<numpunct<char> >(loc_c); VERIFY( loc_2.name() == str_unnamed ); diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/7.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/7.cc index ffcd3ab943a..8b4aafe14f4 100644 --- a/libstdc++-v3/testsuite/22_locale/locale/cons/7.cc +++ b/libstdc++-v3/testsuite/22_locale/locale/cons/7.cc @@ -28,7 +28,7 @@ void test02() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; const string name_c("C"); const string name_no("*"); string str; diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/7222-c.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/7222-c.cc index 003462441ee..ce7b2695ee8 100644 --- a/libstdc++-v3/testsuite/22_locale/locale/cons/7222-c.cc +++ b/libstdc++-v3/testsuite/22_locale/locale/cons/7222-c.cc @@ -28,7 +28,7 @@ // libstdc++/7222 void test02() { - bool test = true; + bool test __attribute__((unused)) = true; std::locale loc_c1("C"); std::locale loc_c2("C"); diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/7222-env.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/7222-env.cc index 8bd9c4ace2a..4524a070b7a 100644 --- a/libstdc++-v3/testsuite/22_locale/locale/cons/7222-env.cc +++ b/libstdc++-v3/testsuite/22_locale/locale/cons/7222-env.cc @@ -28,7 +28,7 @@ // libstdc++/7222 void test02() { - bool test = true; + bool test __attribute__((unused)) = true; std::locale loc_1 = __gnu_test::try_named_locale(""); std::locale loc_2 = __gnu_test::try_named_locale(""); diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/8.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/8.cc index 433fc1fe9ba..5d4fd272f99 100644 --- a/libstdc++-v3/testsuite/22_locale/locale/cons/8.cc +++ b/libstdc++-v3/testsuite/22_locale/locale/cons/8.cc @@ -28,7 +28,7 @@ void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; const locale l1("C"); const locale l2 = diff --git a/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/1.cc b/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/1.cc index 3d2c931ec6d..e5524dd04c9 100644 --- a/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/1.cc +++ b/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/1.cc @@ -30,7 +30,7 @@ class gnu_codecvt: public ccodecvt { }; void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; string str1, str2; diff --git a/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/2.cc b/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/2.cc index 81b06ee0ecd..653eaaf99d6 100644 --- a/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/2.cc +++ b/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/2.cc @@ -28,7 +28,7 @@ void test02() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; const string ph("en_PH"); const string mx("es_MX"); diff --git a/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/3.cc b/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/3.cc index 87d8193051e..5e3ecedee42 100644 --- a/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/3.cc +++ b/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/3.cc @@ -43,7 +43,7 @@ typedef surf facet_type; void test03() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; string name; locale global_orig; diff --git a/libstdc++-v3/testsuite/22_locale/locale/operations/1.cc b/libstdc++-v3/testsuite/22_locale/locale/operations/1.cc index 8fe6aa7ea3d..003da9a35d4 100644 --- a/libstdc++-v3/testsuite/22_locale/locale/operations/1.cc +++ b/libstdc++-v3/testsuite/22_locale/locale/operations/1.cc @@ -31,7 +31,7 @@ void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; string str1, str2; // construct a locale object with the C facet diff --git a/libstdc++-v3/testsuite/22_locale/locale/operations/2.cc b/libstdc++-v3/testsuite/22_locale/locale/operations/2.cc index ed06e10a635..aa5db2ac520 100644 --- a/libstdc++-v3/testsuite/22_locale/locale/operations/2.cc +++ b/libstdc++-v3/testsuite/22_locale/locale/operations/2.cc @@ -38,7 +38,7 @@ protected: void test02() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; // Sanity check. locale loc_c = locale::classic(); diff --git a/libstdc++-v3/testsuite/22_locale/messages/1.cc b/libstdc++-v3/testsuite/22_locale/messages/1.cc index 6eb593239b1..c1281eda3ac 100644 --- a/libstdc++-v3/testsuite/22_locale/messages/1.cc +++ b/libstdc++-v3/testsuite/22_locale/messages/1.cc @@ -30,8 +30,8 @@ void test01() typedef std::locale::facet base_type1; typedef std::messages_base base_type2; const test_type& obj = std::use_facet<test_type>(std::locale()); - const base_type1* base1 = &obj; - const base_type2* base2 = &obj; + const base_type1* base1 __attribute__((unused)) = &obj; + const base_type2* base2 __attribute__((unused)) = &obj; // Check for required typedefs typedef test_type::char_type char_type; diff --git a/libstdc++-v3/testsuite/22_locale/messages/members/char/1.cc b/libstdc++-v3/testsuite/22_locale/messages/members/char/1.cc index 5b360b15a21..9a3a1c93ab1 100644 --- a/libstdc++-v3/testsuite/22_locale/messages/members/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/messages/members/char/1.cc @@ -29,7 +29,7 @@ void test01() typedef std::messages<char>::catalog catalog; typedef std::messages<char>::string_type string_type; - bool test = true; + bool test __attribute__((unused)) = true; // This is defined through CXXFLAGS in scripts/testsuite_flags[.in]. const char* dir = LOCALEDIR; @@ -44,9 +44,6 @@ void test01() VERIFY( loc_de != loc_fr ); // cache the messages facets - const messages<char>& mssg_c = use_facet<messages<char> >(loc_c); - const messages<char>& mssg_us = use_facet<messages<char> >(loc_us); - const messages<char>& mssg_fr = use_facet<messages<char> >(loc_fr); const messages<char>& mssg_de = use_facet<messages<char> >(loc_de); // catalog open(const string&, const locale&) const; diff --git a/libstdc++-v3/testsuite/22_locale/messages/members/char/2.cc b/libstdc++-v3/testsuite/22_locale/messages/members/char/2.cc index 389d3721a1b..c9cae5053f3 100644 --- a/libstdc++-v3/testsuite/22_locale/messages/members/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/messages/members/char/2.cc @@ -29,7 +29,7 @@ void test02() typedef std::messages<char>::catalog catalog; typedef std::messages<char>::string_type string_type; - bool test = true; + bool test __attribute__((unused)) = true; // This is defined through CXXFLAGS in scripts/testsuite_flags[.in]. const char* dir = LOCALEDIR; @@ -44,10 +44,7 @@ void test02() VERIFY( loc_de != loc_fr ); // cache the messages facets - const messages<char>& mssg_c = use_facet<messages<char> >(loc_c); - const messages<char>& mssg_us = use_facet<messages<char> >(loc_us); const messages<char>& mssg_fr = use_facet<messages<char> >(loc_fr); - const messages<char>& mssg_de = use_facet<messages<char> >(loc_de); // catalog open(const string&, const locale&) const; // string_type get(catalog, int, int, const string_type& ) const; diff --git a/libstdc++-v3/testsuite/22_locale/messages/members/char/3.cc b/libstdc++-v3/testsuite/22_locale/messages/members/char/3.cc index d4abacc99ed..8d00eb5a882 100644 --- a/libstdc++-v3/testsuite/22_locale/messages/members/char/3.cc +++ b/libstdc++-v3/testsuite/22_locale/messages/members/char/3.cc @@ -29,7 +29,7 @@ void test03() typedef std::messages<char>::catalog catalog; typedef std::messages<char>::string_type string_type; - bool test = true; + bool test __attribute__((unused)) = true; // This is defined through CXXFLAGS in scripts/testsuite_flags[.in]. const char* dir = LOCALEDIR; @@ -44,10 +44,8 @@ void test03() VERIFY( loc_de != loc_fr ); // cache the messages facets - const messages<char>& mssg_c = use_facet<messages<char> >(loc_c); const messages<char>& mssg_us = use_facet<messages<char> >(loc_us); const messages<char>& mssg_fr = use_facet<messages<char> >(loc_fr); - const messages<char>& mssg_de = use_facet<messages<char> >(loc_de); // catalog open(const string&, const locale&) const; // string_type get(catalog, int, int, const string_type& ) const; diff --git a/libstdc++-v3/testsuite/22_locale/messages_byname/1.cc b/libstdc++-v3/testsuite/22_locale/messages_byname/1.cc index cc8860bef9d..3072383a988 100644 --- a/libstdc++-v3/testsuite/22_locale/messages_byname/1.cc +++ b/libstdc++-v3/testsuite/22_locale/messages_byname/1.cc @@ -29,7 +29,7 @@ void test01() typedef std::messages<char>::catalog catalog; typedef std::messages<char>::string_type string_type; - bool test = true; + bool test __attribute__((unused)) = true; string str; // This is defined through CXXFLAGS in scripts/testsuite_flags[.in]. const char* dir = LOCALEDIR; diff --git a/libstdc++-v3/testsuite/22_locale/money_get/1.cc b/libstdc++-v3/testsuite/22_locale/money_get/1.cc index 86fcd18b501..f3b7232f630 100644 --- a/libstdc++-v3/testsuite/22_locale/money_get/1.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get/1.cc @@ -29,7 +29,7 @@ void test01() typedef std::money_get<char> test_type; typedef std::locale::facet base_type; const test_type& obj = std::use_facet<test_type>(std::locale()); - const base_type* base = &obj; + const base_type* base __attribute__((unused)) = &obj; // Check for required typedefs typedef test_type::char_type char_type; diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/1.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/1.cc index ed0d19e46ec..39dca1df909 100644 --- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/1.cc @@ -32,7 +32,7 @@ void test01() typedef money_base::pattern pattern; typedef istreambuf_iterator<char> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); @@ -47,12 +47,6 @@ void test01() // cache the moneypunct facets typedef moneypunct<char, true> __money_true; typedef moneypunct<char, false> __money_false; - const __money_true& monpunct_c_t = use_facet<__money_true>(loc_c); - const __money_true& monpunct_de_t = use_facet<__money_true>(loc_de); - const __money_false& monpunct_c_f = use_facet<__money_false>(loc_c); - const __money_false& monpunct_de_f = use_facet<__money_false>(loc_de); - const __money_true& monpunct_hk_t = use_facet<__money_true>(loc_hk); - const __money_false& monpunct_hk_f = use_facet<__money_false>(loc_hk); // sanity check the data is correct. const string empty; diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/11528.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/11528.cc index c4f00f7add9..17825d546b2 100644 --- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/11528.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/11528.cc @@ -27,7 +27,7 @@ void test01() using namespace std; typedef istreambuf_iterator<char> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; locale loc_us = __gnu_test::try_named_locale("en_US"); diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/2.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/2.cc index ddb2c3f5d6f..422a53340eb 100644 --- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/2.cc @@ -32,7 +32,7 @@ void test02() typedef money_base::pattern pattern; typedef istreambuf_iterator<char> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); @@ -47,12 +47,6 @@ void test02() // cache the moneypunct facets typedef moneypunct<char, true> __money_true; typedef moneypunct<char, false> __money_false; - const __money_true& monpunct_c_t = use_facet<__money_true>(loc_c); - const __money_true& monpunct_de_t = use_facet<__money_true>(loc_de); - const __money_false& monpunct_c_f = use_facet<__money_false>(loc_c); - const __money_false& monpunct_de_f = use_facet<__money_false>(loc_de); - const __money_true& monpunct_hk_t = use_facet<__money_true>(loc_hk); - const __money_false& monpunct_hk_f = use_facet<__money_false>(loc_hk); // sanity check the data is correct. const string empty; diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/3.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/3.cc index 91ca66fb64c..5904ee112d8 100644 --- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/3.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/3.cc @@ -32,7 +32,7 @@ void test03() typedef money_base::pattern pattern; typedef istreambuf_iterator<char> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); @@ -47,12 +47,6 @@ void test03() // cache the moneypunct facets typedef moneypunct<char, true> __money_true; typedef moneypunct<char, false> __money_false; - const __money_true& monpunct_c_t = use_facet<__money_true>(loc_c); - const __money_true& monpunct_de_t = use_facet<__money_true>(loc_de); - const __money_false& monpunct_c_f = use_facet<__money_false>(loc_c); - const __money_false& monpunct_de_f = use_facet<__money_false>(loc_de); - const __money_true& monpunct_hk_t = use_facet<__money_true>(loc_hk); - const __money_false& monpunct_hk_f = use_facet<__money_false>(loc_hk); // sanity check the data is correct. const string empty; @@ -60,12 +54,6 @@ void test03() // total EPA budget FY 2002 const long double digits1 = 720000000000.0; - // est. cost, national missile "defense", expressed as a loss in USD 2001 - const long double digits2 = -10000000000000.0; - - // input less than frac_digits - const long double digits4 = -1.0; - iterator_type end; istringstream iss; iss.imbue(loc_de); diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/4.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/4.cc index d3c8359b528..a80060aebe0 100644 --- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/4.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/4.cc @@ -32,7 +32,7 @@ void test04() typedef money_base::pattern pattern; typedef istreambuf_iterator<char> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); @@ -47,22 +47,10 @@ void test04() // cache the moneypunct facets typedef moneypunct<char, true> __money_true; typedef moneypunct<char, false> __money_false; - const __money_true& monpunct_c_t = use_facet<__money_true>(loc_c); - const __money_true& monpunct_de_t = use_facet<__money_true>(loc_de); - const __money_false& monpunct_c_f = use_facet<__money_false>(loc_c); - const __money_false& monpunct_de_f = use_facet<__money_false>(loc_de); - const __money_true& monpunct_hk_t = use_facet<__money_true>(loc_hk); - const __money_false& monpunct_hk_f = use_facet<__money_false>(loc_hk); // sanity check the data is correct. const string empty; - // total EPA budget FY 2002 - const long double digits1 = 720000000000.0; - - // est. cost, national missile "defense", expressed as a loss in USD 2001 - const long double digits2 = -10000000000000.0; - // input less than frac_digits const long double digits4 = -1.0; diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/5.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/5.cc index f886c887ebd..e51d4464de5 100644 --- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/5.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/5.cc @@ -27,14 +27,13 @@ void test05() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; // Check money_get works with other iterators besides streambuf // input iterators. typedef string::const_iterator iter_type; typedef money_get<char, iter_type> mon_get_type; const ios_base::iostate goodbit = ios_base::goodbit; - const ios_base::iostate eofbit = ios_base::eofbit; ios_base::iostate err = goodbit; const locale loc_c = locale::classic(); const string str = "0.01Eleanor Roosevelt"; diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/6.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/6.cc index f9afb1e1fa4..8c03e8245ff 100644 --- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/6.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/6.cc @@ -54,7 +54,7 @@ void test06() using namespace std; typedef istreambuf_iterator<char> InIt; - bool test = true; + bool test __attribute__((unused)) = true; locale loc(locale::classic(), new My_money_io); diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/7.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/7.cc index f275d4e59d4..c21a9dfad74 100644 --- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/7.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/7.cc @@ -30,7 +30,7 @@ void test07() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; typedef istreambuf_iterator<char> InIt; InIt iend1, iend2, iend3; diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/8.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/8.cc index 8c811e99a63..01a93381557 100644 --- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/8.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/8.cc @@ -68,7 +68,7 @@ void test08() typedef istreambuf_iterator<char> InIt; bool intl = false; - bool test = true; + bool test __attribute__((unused)) = true; ios_base::iostate err; locale loc_a(locale::classic(), new My_money_io_a); diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/1.cc index a3965f79a6a..0a7f90b6366 100644 --- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/1.cc @@ -32,7 +32,7 @@ void test01() typedef money_base::pattern pattern; typedef istreambuf_iterator<wchar_t> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); @@ -47,12 +47,6 @@ void test01() // cache the moneypunct facets typedef moneypunct<wchar_t, true> __money_true; typedef moneypunct<wchar_t, false> __money_false; - const __money_true& monpunct_c_t = use_facet<__money_true>(loc_c); - const __money_true& monpunct_de_t = use_facet<__money_true>(loc_de); - const __money_false& monpunct_c_f = use_facet<__money_false>(loc_c); - const __money_false& monpunct_de_f = use_facet<__money_false>(loc_de); - const __money_true& monpunct_hk_t = use_facet<__money_true>(loc_hk); - const __money_false& monpunct_hk_f = use_facet<__money_false>(loc_hk); // sanity check the data is correct. const wstring empty; diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/11528.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/11528.cc index 5c0036162fc..8649db41187 100644 --- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/11528.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/11528.cc @@ -27,7 +27,7 @@ void test01() using namespace std; typedef istreambuf_iterator<wchar_t> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; locale loc_us = __gnu_test::try_named_locale("en_US"); diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/2.cc index a3959df3218..f59cef7a929 100644 --- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/2.cc @@ -32,7 +32,7 @@ void test02() typedef money_base::pattern pattern; typedef istreambuf_iterator<wchar_t> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); @@ -47,12 +47,6 @@ void test02() // cache the moneypunct facets typedef moneypunct<wchar_t, true> __money_true; typedef moneypunct<wchar_t, false> __money_false; - const __money_true& monpunct_c_t = use_facet<__money_true>(loc_c); - const __money_true& monpunct_de_t = use_facet<__money_true>(loc_de); - const __money_false& monpunct_c_f = use_facet<__money_false>(loc_c); - const __money_false& monpunct_de_f = use_facet<__money_false>(loc_de); - const __money_true& monpunct_hk_t = use_facet<__money_true>(loc_hk); - const __money_false& monpunct_hk_f = use_facet<__money_false>(loc_hk); // sanity check the data is correct. const wstring empty; diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/3.cc index 2883e7a4d43..d0c8b06b6f3 100644 --- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/3.cc @@ -32,7 +32,7 @@ void test03() typedef money_base::pattern pattern; typedef istreambuf_iterator<wchar_t> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); @@ -47,24 +47,12 @@ void test03() // cache the moneypunct facets typedef moneypunct<wchar_t, true> __money_true; typedef moneypunct<wchar_t, false> __money_false; - const __money_true& monpunct_c_t = use_facet<__money_true>(loc_c); - const __money_true& monpunct_de_t = use_facet<__money_true>(loc_de); - const __money_false& monpunct_c_f = use_facet<__money_false>(loc_c); - const __money_false& monpunct_de_f = use_facet<__money_false>(loc_de); - const __money_true& monpunct_hk_t = use_facet<__money_true>(loc_hk); - const __money_false& monpunct_hk_f = use_facet<__money_false>(loc_hk); // sanity check the data is correct. const wstring empty; // total EPA budget FY 2002 const long double digits1 = 720000000000.0; - - // est. cost, national missile "defense", expressed as a loss in USD 2001 - const long double digits2 = -10000000000000.0; - - // input less than frac_digits - const long double digits4 = -1.0; iterator_type end; wistringstream iss; diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/4.cc index 94c27aa7cf9..8861ce46cf5 100644 --- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/4.cc @@ -32,7 +32,7 @@ void test04() typedef money_base::pattern pattern; typedef istreambuf_iterator<wchar_t> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); @@ -47,22 +47,10 @@ void test04() // cache the moneypunct facets typedef moneypunct<wchar_t, true> __money_true; typedef moneypunct<wchar_t, false> __money_false; - const __money_true& monpunct_c_t = use_facet<__money_true>(loc_c); - const __money_true& monpunct_de_t = use_facet<__money_true>(loc_de); - const __money_false& monpunct_c_f = use_facet<__money_false>(loc_c); - const __money_false& monpunct_de_f = use_facet<__money_false>(loc_de); - const __money_true& monpunct_hk_t = use_facet<__money_true>(loc_hk); - const __money_false& monpunct_hk_f = use_facet<__money_false>(loc_hk); // sanity check the data is correct. const wstring empty; - // total EPA budget FY 2002 - const long double digits1 = 720000000000.0; - - // est. cost, national missile "defense", expressed as a loss in USD 2001 - const long double digits2 = -10000000000000.0; - // input less than frac_digits const long double digits4 = -1.0; diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/5.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/5.cc index fd0c53ef313..89b724c0307 100644 --- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/5.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/5.cc @@ -27,14 +27,13 @@ void test05() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; // Check money_get works with other iterators besides streambuf // input iterators. typedef wstring::const_iterator iter_type; typedef money_get<wchar_t, iter_type> mon_get_type; const ios_base::iostate goodbit = ios_base::goodbit; - const ios_base::iostate eofbit = ios_base::eofbit; ios_base::iostate err = goodbit; const locale loc_c = locale::classic(); const wstring str = L"0.01Eleanor Roosevelt"; diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/6.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/6.cc index 0015cd92ca6..5d40fab761f 100644 --- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/6.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/6.cc @@ -54,7 +54,7 @@ void test06() using namespace std; typedef istreambuf_iterator<wchar_t> InIt; - bool test = true; + bool test __attribute__((unused)) = true; locale loc(locale::classic(), new My_money_io); diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/7.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/7.cc index bf8615f1748..c9cf0662e25 100644 --- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/7.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/7.cc @@ -30,7 +30,7 @@ void test07() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; typedef istreambuf_iterator<wchar_t> InIt; InIt iend1, iend2, iend3; diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/8.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/8.cc index ab1de4d3e10..aeaa2573780 100644 --- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/8.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/8.cc @@ -68,7 +68,7 @@ void test08() typedef istreambuf_iterator<wchar_t> InIt; bool intl = false; - bool test = true; + bool test __attribute__((unused)) = true; ios_base::iostate err; locale loc_a(locale::classic(), new My_money_io_a); diff --git a/libstdc++-v3/testsuite/22_locale/money_put/1.cc b/libstdc++-v3/testsuite/22_locale/money_put/1.cc index e4f27c723db..ed6c58c5408 100644 --- a/libstdc++-v3/testsuite/22_locale/money_put/1.cc +++ b/libstdc++-v3/testsuite/22_locale/money_put/1.cc @@ -29,7 +29,7 @@ void test01() typedef std::money_put<char> test_type; typedef std::locale::facet base_type; const test_type& obj = std::use_facet<test_type>(std::locale()); - const base_type* base = &obj; + const base_type* base __attribute__((unused)) = &obj; // Check for required typedefs typedef test_type::char_type char_type; diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/char/1.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/char/1.cc index 12192f5bcab..2692bb4d196 100644 --- a/libstdc++-v3/testsuite/22_locale/money_put/put/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/money_put/put/char/1.cc @@ -32,7 +32,7 @@ void test01() typedef money_base::pattern pattern; typedef ostreambuf_iterator<char> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); @@ -47,12 +47,6 @@ void test01() // cache the moneypunct facets typedef moneypunct<char, true> __money_true; typedef moneypunct<char, false> __money_false; - const __money_true& monpunct_c_t = use_facet<__money_true>(loc_c); - const __money_true& monpunct_de_t = use_facet<__money_true>(loc_de); - const __money_false& monpunct_c_f = use_facet<__money_false>(loc_c); - const __money_false& monpunct_de_f = use_facet<__money_false>(loc_de); - const __money_true& monpunct_hk_t = use_facet<__money_true>(loc_hk); - const __money_false& monpunct_hk_f = use_facet<__money_false>(loc_hk); // sanity check the data is correct. const string empty; diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/char/2.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/char/2.cc index 044ea1174bc..35882b64d5d 100644 --- a/libstdc++-v3/testsuite/22_locale/money_put/put/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/money_put/put/char/2.cc @@ -32,7 +32,7 @@ void test02() typedef money_base::pattern pattern; typedef ostreambuf_iterator<char> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); @@ -47,12 +47,6 @@ void test02() // cache the moneypunct facets typedef moneypunct<char, true> __money_true; typedef moneypunct<char, false> __money_false; - const __money_true& monpunct_c_t = use_facet<__money_true>(loc_c); - const __money_true& monpunct_de_t = use_facet<__money_true>(loc_de); - const __money_false& monpunct_c_f = use_facet<__money_false>(loc_c); - const __money_false& monpunct_de_f = use_facet<__money_false>(loc_de); - const __money_true& monpunct_hk_t = use_facet<__money_true>(loc_hk); - const __money_false& monpunct_hk_f = use_facet<__money_false>(loc_hk); // sanity check the data is correct. const string empty; diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/char/3.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/char/3.cc index ead1aff1b72..1a1ca33d7a9 100644 --- a/libstdc++-v3/testsuite/22_locale/money_put/put/char/3.cc +++ b/libstdc++-v3/testsuite/22_locale/money_put/put/char/3.cc @@ -32,7 +32,7 @@ void test03() typedef money_base::pattern pattern; typedef ostreambuf_iterator<char> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); @@ -47,24 +47,12 @@ void test03() // cache the moneypunct facets typedef moneypunct<char, true> __money_true; typedef moneypunct<char, false> __money_false; - const __money_true& monpunct_c_t = use_facet<__money_true>(loc_c); - const __money_true& monpunct_de_t = use_facet<__money_true>(loc_de); - const __money_false& monpunct_c_f = use_facet<__money_false>(loc_c); - const __money_false& monpunct_de_f = use_facet<__money_false>(loc_de); - const __money_true& monpunct_hk_t = use_facet<__money_true>(loc_hk); - const __money_false& monpunct_hk_f = use_facet<__money_false>(loc_hk); // sanity check the data is correct. const string empty; // total EPA budget FY 2002 const long double digits1 = 720000000000.0; - - // est. cost, national missile "defense", expressed as a loss in USD 2001 - const long double digits2 = -10000000000000.0; - - // input less than frac_digits - const long double digits4 = -1.0; // cache the money_put facet ostringstream oss; diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/char/4.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/char/4.cc index 4d4518fb776..0790ac60f4a 100644 --- a/libstdc++-v3/testsuite/22_locale/money_put/put/char/4.cc +++ b/libstdc++-v3/testsuite/22_locale/money_put/put/char/4.cc @@ -27,14 +27,13 @@ void test04() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; // Check money_put works with other iterators besides streambuf // output iterators. (As long as output_iterator requirements are met.) typedef string::iterator iter_type; typedef money_put<char, iter_type> mon_put_type; const ios_base::iostate goodbit = ios_base::goodbit; - const ios_base::iostate eofbit = ios_base::eofbit; ios_base::iostate err = goodbit; const locale loc_c = locale::classic(); // woman, art, thief (stole the blues) diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/char/5.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/char/5.cc index 86a006d0023..4554d72c8d5 100644 --- a/libstdc++-v3/testsuite/22_locale/money_put/put/char/5.cc +++ b/libstdc++-v3/testsuite/22_locale/money_put/put/char/5.cc @@ -45,7 +45,7 @@ struct My_money_io : public std::moneypunct<char,false> void test05() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; typedef ostreambuf_iterator<char> OutIt; locale loc(locale::classic(), new My_money_io); diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/char/6.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/char/6.cc index b663d76bbe2..5177c76744a 100644 --- a/libstdc++-v3/testsuite/22_locale/money_put/put/char/6.cc +++ b/libstdc++-v3/testsuite/22_locale/money_put/put/char/6.cc @@ -34,7 +34,7 @@ struct My_money_io_2 : public std::moneypunct<char,false> void test06() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; typedef ostreambuf_iterator<char> OutIt; locale loc(locale::classic(), new My_money_io_2); diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/1.cc index 942589bb540..f8f97fa691a 100644 --- a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/1.cc @@ -32,7 +32,7 @@ void test01() typedef money_base::pattern pattern; typedef ostreambuf_iterator<wchar_t> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); @@ -47,12 +47,6 @@ void test01() // cache the moneypunct facets typedef moneypunct<wchar_t, true> __money_true; typedef moneypunct<wchar_t, false> __money_false; - const __money_true& monpunct_c_t = use_facet<__money_true>(loc_c); - const __money_true& monpunct_de_t = use_facet<__money_true>(loc_de); - const __money_false& monpunct_c_f = use_facet<__money_false>(loc_c); - const __money_false& monpunct_de_f = use_facet<__money_false>(loc_de); - const __money_true& monpunct_hk_t = use_facet<__money_true>(loc_hk); - const __money_false& monpunct_hk_f = use_facet<__money_false>(loc_hk); // sanity check the data is correct. const wstring empty; diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/2.cc index 2f32240bd3f..f0e7ea1aabe 100644 --- a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/2.cc @@ -32,7 +32,7 @@ void test02() typedef money_base::pattern pattern; typedef ostreambuf_iterator<wchar_t> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); @@ -47,12 +47,6 @@ void test02() // cache the moneypunct facets typedef moneypunct<wchar_t, true> __money_true; typedef moneypunct<wchar_t, false> __money_false; - const __money_true& monpunct_c_t = use_facet<__money_true>(loc_c); - const __money_true& monpunct_de_t = use_facet<__money_true>(loc_de); - const __money_false& monpunct_c_f = use_facet<__money_false>(loc_c); - const __money_false& monpunct_de_f = use_facet<__money_false>(loc_de); - const __money_true& monpunct_hk_t = use_facet<__money_true>(loc_hk); - const __money_false& monpunct_hk_f = use_facet<__money_false>(loc_hk); // sanity check the data is correct. const wstring empty; diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/3.cc index de5f5db79d6..cd79e54d66d 100644 --- a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/3.cc @@ -32,7 +32,7 @@ void test03() typedef money_base::pattern pattern; typedef ostreambuf_iterator<wchar_t> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); @@ -47,24 +47,12 @@ void test03() // cache the moneypunct facets typedef moneypunct<wchar_t, true> __money_true; typedef moneypunct<wchar_t, false> __money_false; - const __money_true& monpunct_c_t = use_facet<__money_true>(loc_c); - const __money_true& monpunct_de_t = use_facet<__money_true>(loc_de); - const __money_false& monpunct_c_f = use_facet<__money_false>(loc_c); - const __money_false& monpunct_de_f = use_facet<__money_false>(loc_de); - const __money_true& monpunct_hk_t = use_facet<__money_true>(loc_hk); - const __money_false& monpunct_hk_f = use_facet<__money_false>(loc_hk); // sanity check the data is correct. const wstring empty; // total EPA budget FY 2002 const long double digits1 = 720000000000.0; - - // est. cost, national missile "defense", expressed as a loss in USD 2001 - const long double digits2 = -10000000000000.0; - - // input less than frac_digits - const long double digits4 = -1.0; // cache the money_put facet wostringstream oss; diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/4.cc index 397fd2ea7fe..d288dee60ab 100644 --- a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/4.cc @@ -27,14 +27,13 @@ void test04() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; // Check money_put works with other iterators besides streambuf // output iterators. (As long as output_iterator requirements are met.) typedef wstring::iterator iter_type; typedef money_put<wchar_t, iter_type> mon_put_type; const ios_base::iostate goodbit = ios_base::goodbit; - const ios_base::iostate eofbit = ios_base::eofbit; ios_base::iostate err = goodbit; const locale loc_c = locale::classic(); // woman, art, thief (stole the blues) diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/5.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/5.cc index aa5a18c93d9..40b4092eb5f 100644 --- a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/5.cc +++ b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/5.cc @@ -45,7 +45,7 @@ struct My_money_io : public std::moneypunct<wchar_t,false> void test05() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; typedef ostreambuf_iterator<wchar_t> OutIt; locale loc(locale::classic(), new My_money_io); diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/6.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/6.cc index d92619c554d..255aa6e56fc 100644 --- a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/6.cc +++ b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/6.cc @@ -34,7 +34,7 @@ struct My_money_io_2 : public std::moneypunct<wchar_t,false> void test06() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; typedef ostreambuf_iterator<wchar_t> OutIt; locale loc(locale::classic(), new My_money_io_2); diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct/1.cc b/libstdc++-v3/testsuite/22_locale/moneypunct/1.cc index 6ab09c61a61..d74b1d69b4d 100644 --- a/libstdc++-v3/testsuite/22_locale/moneypunct/1.cc +++ b/libstdc++-v3/testsuite/22_locale/moneypunct/1.cc @@ -30,7 +30,7 @@ void test01() typedef std::moneypunct<char, true> test_type; typedef std::locale::facet base_type; const test_type& obj = std::use_facet<test_type>(std::locale()); - const base_type* base = &obj; + const base_type* base __attribute__((unused)) = &obj; // Check for required typedefs typedef test_type::char_type char_type; diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct/2.cc b/libstdc++-v3/testsuite/22_locale/moneypunct/2.cc index edfefbbf89b..e00a427a2be 100644 --- a/libstdc++-v3/testsuite/22_locale/moneypunct/2.cc +++ b/libstdc++-v3/testsuite/22_locale/moneypunct/2.cc @@ -30,7 +30,7 @@ void test02() typedef std::moneypunct<char, false> test_type; typedef std::locale::facet base_type; const test_type& obj = std::use_facet<test_type>(std::locale()); - const base_type* base = &obj; + const base_type* base __attribute__((unused)) = &obj; // Check for required typedefs typedef test_type::char_type char_type; diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/1.cc b/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/1.cc index c8d7b994904..7c8ca599f62 100644 --- a/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/1.cc @@ -30,7 +30,7 @@ void test01() typedef money_base::part part; typedef money_base::pattern pattern; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/2.cc b/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/2.cc index 833995ba35a..70e4516d0ff 100644 --- a/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/2.cc @@ -30,7 +30,7 @@ void test02() typedef money_base::part part; typedef money_base::pattern pattern; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); @@ -42,7 +42,6 @@ void test02() const __money_true& monp_c_t = use_facet<__money_true>(loc_c); const __money_false& monp_c_f = use_facet<__money_false>(loc_c); const __money_true& monp_de_t = use_facet<__money_true>(loc_de); - const __money_false& monp_de_f = use_facet<__money_false>(loc_de); // quick sanity check for data. char q1 = monp_c_t.decimal_point(); diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/1.cc index 7f0d017bf1d..2d26611c646 100644 --- a/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/1.cc @@ -30,7 +30,7 @@ void test01() typedef money_base::part part; typedef money_base::pattern pattern; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/2.cc index d3bbc39da18..dc1d9706123 100644 --- a/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/2.cc @@ -30,7 +30,7 @@ void test02() typedef money_base::part part; typedef money_base::pattern pattern; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); @@ -42,7 +42,6 @@ void test02() const __money_true& monp_c_t = use_facet<__money_true>(loc_c); const __money_false& monp_c_f = use_facet<__money_false>(loc_c); const __money_true& monp_de_t = use_facet<__money_true>(loc_de); - const __money_false& monp_de_f = use_facet<__money_false>(loc_de); // quick sanity check for data. wchar_t q1 = monp_c_t.decimal_point(); diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct_byname/1.cc b/libstdc++-v3/testsuite/22_locale/moneypunct_byname/1.cc index ea0857a5736..2cdef4b1abc 100644 --- a/libstdc++-v3/testsuite/22_locale/moneypunct_byname/1.cc +++ b/libstdc++-v3/testsuite/22_locale/moneypunct_byname/1.cc @@ -29,7 +29,7 @@ void test01() typedef money_base::part part; typedef money_base::pattern pattern; - bool test = true; + bool test __attribute__((unused)) = true; string str; locale loc_de = __gnu_test::try_named_locale("de_DE"); diff --git a/libstdc++-v3/testsuite/22_locale/num_get/1.cc b/libstdc++-v3/testsuite/22_locale/num_get/1.cc index 4a3ced974cf..a9081bbf570 100644 --- a/libstdc++-v3/testsuite/22_locale/num_get/1.cc +++ b/libstdc++-v3/testsuite/22_locale/num_get/1.cc @@ -29,7 +29,7 @@ void test01() typedef std::num_get<char> test_type; typedef std::locale::facet base_type; const test_type& obj = std::use_facet<test_type>(std::locale()); - const base_type* base = &obj; + const base_type* base __attribute__((unused)) = &obj; // Check for required typedefs typedef test_type::char_type char_type; diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/char/1.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/char/1.cc index 190f9921aef..e42e7b4ce74 100644 --- a/libstdc++-v3/testsuite/22_locale/num_get/get/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/num_get/get/char/1.cc @@ -29,7 +29,7 @@ void test01() using namespace std; typedef istreambuf_iterator<char> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); @@ -41,20 +41,11 @@ void test01() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the numpunct facets - const numpunct<char>& numpunct_c = use_facet<numpunct<char> >(loc_c); - const numpunct<char>& numpunct_de = use_facet<numpunct<char> >(loc_de); - const numpunct<char>& numpunct_hk = use_facet<numpunct<char> >(loc_hk); - // sanity check the data is correct. const string empty; - char c; bool b1 = true; bool b0 = false; - long l1 = 2147483647; - long l2 = -2147483647; - long l; unsigned long ul1 = 1294967294; unsigned long ul2 = 0; unsigned long ul; @@ -62,7 +53,6 @@ void test01() double d2 = 3.15e-308; double d; long double ld1 = 6.630025e+4; - long double ld2 = 0.0; long double ld; void* v; const void* cv = &ul2; @@ -148,7 +138,6 @@ void test01() #ifdef _GLIBCXX_USE_LONG_LONG long long ll1 = 9223372036854775807LL; - long long ll2 = -9223372036854775807LL; long long ll; iss.str("9.223.372.036.854.775.807"); diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/char/2.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/char/2.cc index 8d0ce69e254..35200f8762f 100644 --- a/libstdc++-v3/testsuite/22_locale/num_get/get/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/num_get/get/char/2.cc @@ -29,7 +29,7 @@ void test02() using namespace std; typedef istreambuf_iterator<char> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); @@ -41,31 +41,17 @@ void test02() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the numpunct facets - const numpunct<char>& numpunct_c = use_facet<numpunct<char> >(loc_c); - const numpunct<char>& numpunct_de = use_facet<numpunct<char> >(loc_de); - const numpunct<char>& numpunct_hk = use_facet<numpunct<char> >(loc_hk); - // sanity check the data is correct. const string empty; - char c; bool b1 = true; bool b0 = false; - long l1 = 2147483647; - long l2 = -2147483647; - long l; unsigned long ul1 = 1294967294; unsigned long ul2 = 0; unsigned long ul; double d1 = 1.02345e+308; double d2 = 3.15e-308; double d; - long double ld1 = 6.630025e+4; - long double ld2 = 0.0; - long double ld; - void* v; - const void* cv = &ul2; // cache the num_get facet istringstream iss; diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/char/3.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/char/3.cc index 43e16c2d2c4..8048dd39a75 100644 --- a/libstdc++-v3/testsuite/22_locale/num_get/get/char/3.cc +++ b/libstdc++-v3/testsuite/22_locale/num_get/get/char/3.cc @@ -29,7 +29,7 @@ void test03() using namespace std; typedef istreambuf_iterator<char> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); @@ -41,38 +41,18 @@ void test03() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the numpunct facets - const numpunct<char>& numpunct_c = use_facet<numpunct<char> >(loc_c); - const numpunct<char>& numpunct_de = use_facet<numpunct<char> >(loc_de); - const numpunct<char>& numpunct_hk = use_facet<numpunct<char> >(loc_hk); - // sanity check the data is correct. const string empty; - char c; - bool b1 = true; - bool b0 = false; long l1 = 2147483647; long l2 = -2147483647; long l; - unsigned long ul1 = 1294967294; - unsigned long ul2 = 0; - unsigned long ul; - double d1 = 1.02345e+308; - double d2 = 3.15e-308; - double d; - long double ld1 = 6.630025e+4; - long double ld2 = 0.0; - long double ld; - void* v; - const void* cv = &ul2; // cache the num_get facet istringstream iss; iss.imbue(loc_hk); const num_get<char>& ng = use_facet<num_get<char> >(iss.getloc()); const ios_base::iostate goodbit = ios_base::goodbit; - const ios_base::iostate eofbit = ios_base::eofbit; ios_base::iostate err = ios_base::goodbit; // HK diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/char/4.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/char/4.cc index aed5fcb4370..f7c4cb044dc 100644 --- a/libstdc++-v3/testsuite/22_locale/num_get/get/char/4.cc +++ b/libstdc++-v3/testsuite/22_locale/num_get/get/char/4.cc @@ -29,14 +29,13 @@ void test04() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; // Check num_get works with other iterators besides streambuf // output iterators. (As long as output_iterator requirements are met.) typedef string::const_iterator iter_type; typedef num_get<char, iter_type> num_get_type; const ios_base::iostate goodbit = ios_base::goodbit; - const ios_base::iostate eofbit = ios_base::eofbit; ios_base::iostate err = ios_base::goodbit; const locale loc_c = locale::classic(); const string str("20000106 Elizabeth Durack"); diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/char/5.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/char/5.cc index e170931d060..ad43c9d79cf 100644 --- a/libstdc++-v3/testsuite/22_locale/num_get/get/char/5.cc +++ b/libstdc++-v3/testsuite/22_locale/num_get/get/char/5.cc @@ -29,7 +29,7 @@ void test05() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; unsigned long ul; diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/char/6.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/char/6.cc index 52722d1acb8..ccf51d3dbd6 100644 --- a/libstdc++-v3/testsuite/22_locale/num_get/get/char/6.cc +++ b/libstdc++-v3/testsuite/22_locale/num_get/get/char/6.cc @@ -28,7 +28,7 @@ void test06() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; double d = 0.0; diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/1.cc index 952651d883c..79fc4291c1c 100644 --- a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/1.cc @@ -29,7 +29,7 @@ void test01() using namespace std; typedef istreambuf_iterator<wchar_t> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); @@ -41,20 +41,11 @@ void test01() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the numpunct facets - const numpunct<wchar_t>& numpunct_c = use_facet<numpunct<wchar_t> >(loc_c); - const numpunct<wchar_t>& numpunct_de = use_facet<numpunct<wchar_t> >(loc_de); - const numpunct<wchar_t>& numpunct_hk = use_facet<numpunct<wchar_t> >(loc_hk); - // sanity check the data is correct. const wstring empty; - char c; bool b1 = true; bool b0 = false; - long l1 = 2147483647; - long l2 = -2147483647; - long l; unsigned long ul1 = 1294967294; unsigned long ul2 = 0; unsigned long ul; @@ -62,7 +53,6 @@ void test01() double d2 = 3.15e-308; double d; long double ld1 = 6.630025e+4; - long double ld2 = 0.0; long double ld; void* v; const void* cv = &ul2; @@ -147,7 +137,6 @@ void test01() #ifdef _GLIBCXX_USE_LONG_LONG long long ll1 = 9223372036854775807LL; - long long ll2 = -9223372036854775807LL; long long ll; iss.str(L"9.223.372.036.854.775.807"); diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/2.cc index 6f52860f3bf..ec1b338b1da 100644 --- a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/2.cc @@ -29,7 +29,7 @@ void test02() using namespace std; typedef istreambuf_iterator<wchar_t> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); @@ -41,31 +41,17 @@ void test02() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the numpunct facets - const numpunct<wchar_t>& numpunct_c = use_facet<numpunct<wchar_t> >(loc_c); - const numpunct<wchar_t>& numpunct_de = use_facet<numpunct<wchar_t> >(loc_de); - const numpunct<wchar_t>& numpunct_hk = use_facet<numpunct<wchar_t> >(loc_hk); - // sanity check the data is correct. const wstring empty; - char c; bool b1 = true; bool b0 = false; - long l1 = 2147483647; - long l2 = -2147483647; - long l; unsigned long ul1 = 1294967294; unsigned long ul2 = 0; unsigned long ul; double d1 = 1.02345e+308; double d2 = 3.15e-308; double d; - long double ld1 = 6.630025e+4; - long double ld2 = 0.0; - long double ld; - void* v; - const void* cv = &ul2; // cache the num_get facet wistringstream iss; diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/3.cc index 3a775682a2b..fbe887bee90 100644 --- a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/3.cc @@ -29,7 +29,7 @@ void test03() using namespace std; typedef istreambuf_iterator<wchar_t> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); @@ -41,38 +41,18 @@ void test03() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the numpunct facets - const numpunct<wchar_t>& numpunct_c = use_facet<numpunct<wchar_t> >(loc_c); - const numpunct<wchar_t>& numpunct_de = use_facet<numpunct<wchar_t> >(loc_de); - const numpunct<wchar_t>& numpunct_hk = use_facet<numpunct<wchar_t> >(loc_hk); - // sanity check the data is correct. const wstring empty; - char c; - bool b1 = true; - bool b0 = false; long l1 = 2147483647; long l2 = -2147483647; long l; - unsigned long ul1 = 1294967294; - unsigned long ul2 = 0; - unsigned long ul; - double d1 = 1.02345e+308; - double d2 = 3.15e-308; - double d; - long double ld1 = 6.630025e+4; - long double ld2 = 0.0; - long double ld; - void* v; - const void* cv = &ul2; // cache the num_get facet wistringstream iss; iss.imbue(loc_hk); const num_get<wchar_t>& ng = use_facet<num_get<wchar_t> >(iss.getloc()); const ios_base::iostate goodbit = ios_base::goodbit; - const ios_base::iostate eofbit = ios_base::eofbit; ios_base::iostate err = ios_base::goodbit; // HK diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/4.cc index f23aa0f1555..9b956571d02 100644 --- a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/4.cc @@ -29,14 +29,13 @@ void test04() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; // Check num_get works with other iterators besides streambuf // output iterators. (As long as output_iterator requirements are met.) typedef wstring::const_iterator iter_type; typedef num_get<wchar_t, iter_type> num_get_type; const ios_base::iostate goodbit = ios_base::goodbit; - const ios_base::iostate eofbit = ios_base::eofbit; ios_base::iostate err = ios_base::goodbit; const locale loc_c = locale::classic(); const wstring str(L"20000106 Elizabeth Durack"); diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/5.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/5.cc index 09f12be587b..618b74ceaa0 100644 --- a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/5.cc +++ b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/5.cc @@ -29,7 +29,7 @@ void test05() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; unsigned long ul; diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/6.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/6.cc index e2aeb184b23..fac26fe173a 100644 --- a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/6.cc +++ b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/6.cc @@ -28,7 +28,7 @@ void test06() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; double d = 0.0; diff --git a/libstdc++-v3/testsuite/22_locale/num_put/1.cc b/libstdc++-v3/testsuite/22_locale/num_put/1.cc index 2dabe86d830..b520007f740 100644 --- a/libstdc++-v3/testsuite/22_locale/num_put/1.cc +++ b/libstdc++-v3/testsuite/22_locale/num_put/1.cc @@ -29,7 +29,7 @@ void test01() typedef std::num_put<char> test_type; typedef std::locale::facet base_type; const test_type& obj = std::use_facet<test_type>(std::locale()); - const base_type* base = &obj; + const base_type* base __attribute__((unused)) = &obj; // Check for required typedefs typedef test_type::char_type char_type; diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/char/1.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/char/1.cc index cc1759129c6..879337a0d62 100644 --- a/libstdc++-v3/testsuite/22_locale/num_put/put/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/num_put/put/char/1.cc @@ -29,7 +29,7 @@ void test01() using namespace std; typedef ostreambuf_iterator<char> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); @@ -42,22 +42,16 @@ void test01() VERIFY( loc_de != loc_fr ); // cache the numpunct facets - const numpunct<char>& numpunct_c = use_facet<numpunct<char> >(loc_c); const numpunct<char>& numpunct_de = use_facet<numpunct<char> >(loc_de); - const numpunct<char>& numpunct_hk = use_facet<numpunct<char> >(loc_hk); // sanity check the data is correct. const string empty; string result1; string result2; - char c; bool b1 = true; bool b0 = false; - long l1 = 2147483647; - long l2 = -2147483647; unsigned long ul1 = 1294967294; - unsigned long ul2 = 0; double d1 = 1.7976931348623157e+308; double d2 = 2.2250738585072014e-308; long double ld1 = 1.7976931348623157e+308; @@ -157,7 +151,6 @@ void test01() #ifdef _GLIBCXX_USE_LONG_LONG long long ll1 = 9223372036854775807LL; - long long ll2 = -9223372036854775807LL; oss.str(empty); oss.clear(); diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/char/2.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/char/2.cc index 5f783320c5f..6b6eb3e3f12 100644 --- a/libstdc++-v3/testsuite/22_locale/num_put/put/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/num_put/put/char/2.cc @@ -29,7 +29,7 @@ void test02() using namespace std; typedef ostreambuf_iterator<char> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); @@ -41,28 +41,15 @@ void test02() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the numpunct facets - const numpunct<char>& numpunct_c = use_facet<numpunct<char> >(loc_c); - const numpunct<char>& numpunct_de = use_facet<numpunct<char> >(loc_de); - const numpunct<char>& numpunct_hk = use_facet<numpunct<char> >(loc_hk); - // sanity check the data is correct. const string empty; string result1; string result2; - char c; bool b1 = true; bool b0 = false; - long l1 = 2147483647; - long l2 = -2147483647; unsigned long ul1 = 1294967294; unsigned long ul2 = 0; - double d1 = 1.7976931348623157e+308; - double d2 = 2.2250738585072014e-308; - long double ld1 = 1.7976931348623157e+308; - long double ld2 = 2.2250738585072014e-308; - const void* cv = &ld1; // cache the num_put facet ostringstream oss; diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/char/3.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/char/3.cc index cae87474f29..064e2d79dcb 100644 --- a/libstdc++-v3/testsuite/22_locale/num_put/put/char/3.cc +++ b/libstdc++-v3/testsuite/22_locale/num_put/put/char/3.cc @@ -29,7 +29,7 @@ void test03() using namespace std; typedef ostreambuf_iterator<char> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); @@ -41,28 +41,13 @@ void test03() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the numpunct facets - const numpunct<char>& numpunct_c = use_facet<numpunct<char> >(loc_c); - const numpunct<char>& numpunct_de = use_facet<numpunct<char> >(loc_de); - const numpunct<char>& numpunct_hk = use_facet<numpunct<char> >(loc_hk); - // sanity check the data is correct. const string empty; string result1; string result2; - char c; - bool b1 = true; - bool b0 = false; long l1 = 2147483647; long l2 = -2147483647; - unsigned long ul1 = 1294967294; - unsigned long ul2 = 0; - double d1 = 1.7976931348623157e+308; - double d2 = 2.2250738585072014e-308; - long double ld1 = 1.7976931348623157e+308; - long double ld2 = 2.2250738585072014e-308; - const void* cv = &ld1; // cache the num_put facet ostringstream oss; diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/char/4.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/char/4.cc index 7ce358311fe..e7b139b0270 100644 --- a/libstdc++-v3/testsuite/22_locale/num_put/put/char/4.cc +++ b/libstdc++-v3/testsuite/22_locale/num_put/put/char/4.cc @@ -27,15 +27,13 @@ void test04() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; // Check num_put works with other iterators besides streambuf // output iterators. (As long as output_iterator requirements are met.) typedef string::iterator iter_type; typedef char_traits<char> traits; typedef num_put<char, iter_type> num_put_type; - const ios_base::iostate goodbit = ios_base::goodbit; - const ios_base::iostate eofbit = ios_base::eofbit; const locale loc_c = locale::classic(); const string str("1798 Lady Elgin"); const string str2("0 true 0xbffff74c Mary Nisbet"); diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/char/5.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/char/5.cc index ce590ea57e8..467ecf9e43f 100644 --- a/libstdc++-v3/testsuite/22_locale/num_put/put/char/5.cc +++ b/libstdc++-v3/testsuite/22_locale/num_put/put/char/5.cc @@ -30,7 +30,7 @@ void test05() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; // A locale that expects grouping. locale loc_de = __gnu_test::try_named_locale("de_DE"); diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/char/6.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/char/6.cc index 3cc550710bb..4675fc42111 100644 --- a/libstdc++-v3/testsuite/22_locale/num_put/put/char/6.cc +++ b/libstdc++-v3/testsuite/22_locale/num_put/put/char/6.cc @@ -28,7 +28,7 @@ void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; ostringstream oss1, oss2; const num_put<char>& np1 = use_facet<num_put<char> >(oss1.getloc()); diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/char/7.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/char/7.cc index d5586cc3ada..8299be9d8ab 100644 --- a/libstdc++-v3/testsuite/22_locale/num_put/put/char/7.cc +++ b/libstdc++-v3/testsuite/22_locale/num_put/put/char/7.cc @@ -28,7 +28,7 @@ void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; typedef num_put<char> np_t; diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/1.cc index 379a1379d51..86a02a6e408 100644 --- a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/1.cc @@ -29,7 +29,7 @@ void test01() using namespace std; typedef ostreambuf_iterator<wchar_t> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); @@ -42,22 +42,16 @@ void test01() VERIFY( loc_de != loc_fr ); // cache the numpunct facets - const numpunct<wchar_t>& numpunct_c = use_facet<numpunct<wchar_t> >(loc_c); - const numpunct<wchar_t>& numpunct_de = use_facet<numpunct<wchar_t> >(loc_de); - const numpunct<wchar_t>& numpunct_hk = use_facet<numpunct<wchar_t> >(loc_hk); - + const numpunct<wchar_t>& numpunct_de = use_facet<numpunct<wchar_t> >(loc_de); + // sanity check the data is correct. const wstring empty; wstring result1; wstring result2; - char c; bool b1 = true; bool b0 = false; - long l1 = 2147483647; - long l2 = -2147483647; unsigned long ul1 = 1294967294; - unsigned long ul2 = 0; double d1 = 1.7976931348623157e+308; double d2 = 2.2250738585072014e-308; long double ld1 = 1.7976931348623157e+308; @@ -157,7 +151,6 @@ void test01() #ifdef _GLIBCXX_USE_LONG_LONG long long ll1 = 9223372036854775807LL; - long long ll2 = -9223372036854775807LL; oss.str(empty); oss.clear(); diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/2.cc index 30faf63f649..563bf96c825 100644 --- a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/2.cc @@ -29,7 +29,7 @@ void test02() using namespace std; typedef ostreambuf_iterator<wchar_t> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); @@ -41,28 +41,15 @@ void test02() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the numpunct facets - const numpunct<wchar_t>& numpunct_c = use_facet<numpunct<wchar_t> >(loc_c); - const numpunct<wchar_t>& numpunct_de = use_facet<numpunct<wchar_t> >(loc_de); - const numpunct<wchar_t>& numpunct_hk = use_facet<numpunct<wchar_t> >(loc_hk); - // sanity check the data is correct. const wstring empty; wstring result1; wstring result2; - char c; bool b1 = true; bool b0 = false; - long l1 = 2147483647; - long l2 = -2147483647; unsigned long ul1 = 1294967294; unsigned long ul2 = 0; - double d1 = 1.7976931348623157e+308; - double d2 = 2.2250738585072014e-308; - long double ld1 = 1.7976931348623157e+308; - long double ld2 = 2.2250738585072014e-308; - const void* cv = &ld1; // cache the num_put facet wostringstream oss; diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/3.cc index 5115355969f..3c4728ce46c 100644 --- a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/3.cc @@ -29,7 +29,7 @@ void test03() using namespace std; typedef ostreambuf_iterator<wchar_t> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); @@ -41,28 +41,13 @@ void test03() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the numpunct facets - const numpunct<wchar_t>& numpunct_c = use_facet<numpunct<wchar_t> >(loc_c); - const numpunct<wchar_t>& numpunct_de = use_facet<numpunct<wchar_t> >(loc_de); - const numpunct<wchar_t>& numpunct_hk = use_facet<numpunct<wchar_t> >(loc_hk); - // sanity check the data is correct. const wstring empty; wstring result1; wstring result2; - char c; - bool b1 = true; - bool b0 = false; long l1 = 2147483647; long l2 = -2147483647; - unsigned long ul1 = 1294967294; - unsigned long ul2 = 0; - double d1 = 1.7976931348623157e+308; - double d2 = 2.2250738585072014e-308; - long double ld1 = 1.7976931348623157e+308; - long double ld2 = 2.2250738585072014e-308; - const void* cv = &ld1; // cache the num_put facet wostringstream oss; diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/4.cc index 1057a85f42d..3fc65175492 100644 --- a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/4.cc @@ -27,15 +27,13 @@ void test04() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; // Check num_put works with other iterators besides streambuf // output iterators. (As long as output_iterator requirements are met.) typedef wstring::iterator iter_type; typedef char_traits<wchar_t> traits; typedef num_put<wchar_t, iter_type> num_put_type; - const ios_base::iostate goodbit = ios_base::goodbit; - const ios_base::iostate eofbit = ios_base::eofbit; const locale loc_c = locale::classic(); const wstring str(L"1798 Lady Elgin"); const wstring str2(L"0 true 0xbffff74c Mary Nisbet"); diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/5.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/5.cc index ea9e39f231b..51bcbff6c86 100644 --- a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/5.cc +++ b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/5.cc @@ -30,7 +30,7 @@ void test05() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; // A locale that expects grouping. locale loc_de = __gnu_test::try_named_locale("de_DE"); diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/6.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/6.cc index 01733603cfc..88ceb0d9782 100644 --- a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/6.cc +++ b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/6.cc @@ -28,7 +28,7 @@ void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; wostringstream woss1, woss2; const num_put<wchar_t>& np1 = use_facet<num_put<wchar_t> >(woss1.getloc()); diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/7.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/7.cc index 3b181456f29..d8cee64f68f 100644 --- a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/7.cc +++ b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/7.cc @@ -27,7 +27,7 @@ void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; typedef num_put<wchar_t> npw_t; diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/1.cc b/libstdc++-v3/testsuite/22_locale/numpunct/1.cc index f2f94273b9f..955eaef45f1 100644 --- a/libstdc++-v3/testsuite/22_locale/numpunct/1.cc +++ b/libstdc++-v3/testsuite/22_locale/numpunct/1.cc @@ -29,7 +29,7 @@ void test01() typedef std::numpunct<char> test_type; typedef std::locale::facet base_type; const test_type& obj = std::use_facet<test_type>(std::locale()); - const base_type* base = &obj; + const base_type* base __attribute__((unused)) = &obj; } int main() diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/1.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/1.cc index b57ecb21fac..111ad527a74 100644 --- a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/1.cc @@ -27,7 +27,7 @@ void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); @@ -41,9 +41,6 @@ void test01() // cache the numpunct facets const numpunct<char>& nump_c = use_facet<numpunct<char> >(loc_c); - const numpunct<char>& nump_us = use_facet<numpunct<char> >(loc_us); - const numpunct<char>& nump_fr = use_facet<numpunct<char> >(loc_fr); - const numpunct<char>& nump_de = use_facet<numpunct<char> >(loc_de); // sanity check the data is correct. char dp1 = nump_c.decimal_point(); diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/2.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/2.cc index 0ff21db6dce..cbff78e5740 100644 --- a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/2.cc @@ -27,7 +27,7 @@ void test02() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); @@ -46,8 +46,6 @@ void test02() const numpunct<char>& nump_de = use_facet<numpunct<char> >(loc_de); // sanity check the data is correct. - char dp1 = nump_c.decimal_point(); - char th1 = nump_c.thousands_sep(); string g1 = nump_c.grouping(); string t1 = nump_c.truename(); string f1 = nump_c.falsename(); diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/cache_1.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/cache_1.cc index 002b0c47e37..57a6de733e8 100644 --- a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/cache_1.cc +++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/cache_1.cc @@ -47,7 +47,7 @@ void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; const string basestr("true"); const string derivedstr("truest"); diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/cache_2.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/cache_2.cc index 729e82a64bd..6be2ec04f88 100644 --- a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/cache_2.cc +++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/cache_2.cc @@ -46,7 +46,7 @@ void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; const string empty; const string basestr("true"); const string derivedstr("truest"); diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/pod/1.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/pod/1.cc index c0cf534af7b..da6a149d307 100644 --- a/libstdc++-v3/testsuite/22_locale/numpunct/members/pod/1.cc +++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/pod/1.cc @@ -36,7 +36,7 @@ namespace std { template<> void - numpunct<podchar_type>::_M_initialize_numpunct(__c_locale __cloc) + numpunct<podchar_type>::_M_initialize_numpunct(__c_locale) { if (!_M_data) _M_data = new __numpunct_cache<podchar_type>; @@ -92,7 +92,7 @@ void test01() typedef basic_stringbuf<podchar_type> stringbuf_type; typedef basic_ostream<podchar_type> ostream_type; - bool test = true; + bool test __attribute__((unused)) = true; // Pre-cache sanity check. const locale loc(locale::classic(), new numpunct<podchar_type>); diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/pod/2.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/pod/2.cc index 32b26eda0cd..10b5dedfe0c 100644 --- a/libstdc++-v3/testsuite/22_locale/numpunct/members/pod/2.cc +++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/pod/2.cc @@ -37,24 +37,24 @@ namespace std template<> bool ctype<podchar_type>:: - do_is(mask __m, char_type __c) const { return true; } + do_is(mask, char_type) const { return true; } template<> const podchar_type* ctype<podchar_type>:: - do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const + do_is(const char_type* __lo, const char_type*, mask*) const { return __lo; } template<> const podchar_type* ctype<podchar_type>:: - do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const + do_scan_is(mask, const char_type* __lo, const char_type*) const { return __lo; } template<> const podchar_type* ctype<podchar_type>:: - do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const + do_scan_not(mask, const char_type* __lo, const char_type*) const { return __lo; } template<> @@ -66,7 +66,7 @@ namespace std template<> const podchar_type* ctype<podchar_type>:: - do_toupper(char_type* __lo, const char_type* __hi) const + do_toupper(char_type*, const char_type* __hi) const { return __hi; } template<> @@ -78,7 +78,7 @@ namespace std template<> const podchar_type* ctype<podchar_type>:: - do_tolower(char_type* __lo, const char_type* __hi) const + do_tolower(char_type*, const char_type* __hi) const { return __hi; } template<> @@ -114,7 +114,7 @@ namespace std const podchar_type* ctype<podchar_type>:: do_narrow(const podchar_type* __lo, const podchar_type* __hi, - char __dfault, char* __dest) const + char, char* __dest) const { while (__lo < __hi) { @@ -130,7 +130,7 @@ namespace std template<> void - numpunct<podchar_type>::_M_initialize_numpunct(__c_locale __cloc) + numpunct<podchar_type>::_M_initialize_numpunct(__c_locale) { if (!_M_data) _M_data = new __numpunct_cache<podchar_type>; diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/1.cc index ef1c9f0af7d..5d60b6cb7e0 100644 --- a/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/1.cc @@ -27,7 +27,7 @@ void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); @@ -41,9 +41,6 @@ void test01() // cache the numpunct facets const numpunct<wchar_t>& nump_c = use_facet<numpunct<wchar_t> >(loc_c); - const numpunct<wchar_t>& nump_us = use_facet<numpunct<wchar_t> >(loc_us); - const numpunct<wchar_t>& nump_fr = use_facet<numpunct<wchar_t> >(loc_fr); - const numpunct<wchar_t>& nump_de = use_facet<numpunct<wchar_t> >(loc_de); // sanity check the data is correct. wchar_t dp1 = nump_c.decimal_point(); diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/2.cc index fce8fa2c6d7..94e4b1d341f 100644 --- a/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/2.cc @@ -27,7 +27,7 @@ void test02() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction locale loc_c = locale::classic(); @@ -46,8 +46,6 @@ void test02() const numpunct<wchar_t>& nump_de = use_facet<numpunct<wchar_t> >(loc_de); // sanity check the data is correct. - wchar_t dp1 = nump_c.decimal_point(); - wchar_t th1 = nump_c.thousands_sep(); string g1 = nump_c.grouping(); wstring t1 = nump_c.truename(); wstring f1 = nump_c.falsename(); diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/cache_1.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/cache_1.cc index 0b41e963f50..fc96d05c54f 100644 --- a/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/cache_1.cc +++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/cache_1.cc @@ -47,7 +47,7 @@ void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; const wstring basestr(L"true"); const wstring derivedstr(L"truest"); diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/cache_2.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/cache_2.cc index 9a3c4872e5c..09661c9482d 100644 --- a/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/cache_2.cc +++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/cache_2.cc @@ -46,7 +46,7 @@ void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; const wstring empty; const wstring basestr(L"true"); const wstring derivedstr(L"truest"); diff --git a/libstdc++-v3/testsuite/22_locale/numpunct_byname/1.cc b/libstdc++-v3/testsuite/22_locale/numpunct_byname/1.cc index a3fcaf268f4..171149ec767 100644 --- a/libstdc++-v3/testsuite/22_locale/numpunct_byname/1.cc +++ b/libstdc++-v3/testsuite/22_locale/numpunct_byname/1.cc @@ -27,7 +27,7 @@ void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; string str; locale loc_de = __gnu_test::try_named_locale("de_DE"); diff --git a/libstdc++-v3/testsuite/22_locale/numpunct_byname/2.cc b/libstdc++-v3/testsuite/22_locale/numpunct_byname/2.cc index 4e6c9d68e62..57e7f301984 100644 --- a/libstdc++-v3/testsuite/22_locale/numpunct_byname/2.cc +++ b/libstdc++-v3/testsuite/22_locale/numpunct_byname/2.cc @@ -27,7 +27,7 @@ void test02() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; locale loc_it = __gnu_test::try_named_locale("it_IT"); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/1.cc index 04d4aa84ce0..d6de6422c3a 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/1.cc @@ -30,8 +30,8 @@ void test01() typedef std::locale::facet base_type1; typedef std::time_base base_type2; const test_type& obj = std::use_facet<test_type>(std::locale()); - const base_type1* base1 = &obj; - const base_type2* base2 = &obj; + const base_type1* base1 __attribute__((unused)) = &obj; + const base_type2* base2 __attribute__((unused)) = &obj; // Check for required typedefs typedef test_type::char_type char_type; diff --git a/libstdc++-v3/testsuite/22_locale/time_get/date_order/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/date_order/char/1.cc index f4f0b88502c..4eb2a3149e0 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/date_order/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/date_order/char/1.cc @@ -1,5 +1,4 @@ // 2001-09-21 Benjamin Kosnik <bkoz@redhat.com> - // Copyright (C) 2001, 2002, 2003 Free Software Foundation // // This file is part of the GNU ISO C++ Library. This library is free @@ -27,7 +26,7 @@ void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; typedef time_base::dateorder dateorder; typedef istreambuf_iterator<char> iterator_type; @@ -41,13 +40,7 @@ void test01() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the __timepunct facets, for quicker gdb inspection - const __timepunct<char>& time_c = use_facet<__timepunct<char> >(loc_c); - const __timepunct<char>& time_de = use_facet<__timepunct<char> >(loc_de); - const __timepunct<char>& time_hk = use_facet<__timepunct<char> >(loc_hk); - const __timepunct<char>& time_fr = use_facet<__timepunct<char> >(loc_fr); - - const string empty; + const string empty; // create an ostream-derived object, cache the time_get facet iterator_type end; diff --git a/libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/1.cc index c9c19dfc29a..3916275ae73 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/1.cc @@ -27,7 +27,7 @@ void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; typedef time_base::dateorder dateorder; typedef istreambuf_iterator<wchar_t> iterator_type; @@ -41,12 +41,6 @@ void test01() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the __timepunct facets, for quicker gdb inspection - const __timepunct<wchar_t>& time_c = use_facet<__timepunct<wchar_t> >(loc_c); - const __timepunct<wchar_t>& time_de = use_facet<__timepunct<wchar_t> >(loc_de); - const __timepunct<wchar_t>& time_hk = use_facet<__timepunct<wchar_t> >(loc_hk); - const __timepunct<wchar_t>& time_fr = use_facet<__timepunct<wchar_t> >(loc_fr); - const string empty; // create an ostream-derived object, cache the time_get facet diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/1.cc index 7c54955a76e..0aa5ddcc0fa 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/1.cc @@ -30,7 +30,7 @@ void test01() typedef time_base::dateorder dateorder; typedef istreambuf_iterator<char> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction and sanity checks. locale loc_c = locale::classic(); @@ -42,12 +42,6 @@ void test01() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the __timepunct facets, for quicker gdb inspection - const __timepunct<char>& time_c = use_facet<__timepunct<char> >(loc_c); - const __timepunct<char>& time_de = use_facet<__timepunct<char> >(loc_de); - const __timepunct<char>& time_hk = use_facet<__timepunct<char> >(loc_hk); - const __timepunct<char>& time_fr = use_facet<__timepunct<char> >(loc_fr); - const string empty; // create an ostream-derived object, cache the time_get facet @@ -61,11 +55,7 @@ void test01() ios_base::iostate errorstate = good; // create "C" time objects - const tm time_bday = { 0, 0, 12, 4, 3, 71 }; - const char* all = "%a %A %b %B %c %d %H %I %j %m %M %p %s %U " - "%w %W %x %X %y %Y %Z %%"; - const char* date = "%A, the second of %B"; - const char* date_ex = "%Ex"; + const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; // iter_type // get_date(iter_type, iter_type, ios_base&, ios_base::iostate&, tm*) const diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/2.cc index 63d2602272a..9860b43a615 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/2.cc @@ -30,7 +30,7 @@ void test02() typedef time_base::dateorder dateorder; typedef istreambuf_iterator<char> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction and sanity checks. locale loc_c = locale::classic(); @@ -42,12 +42,6 @@ void test02() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the __timepunct facets, for quicker gdb inspection - const __timepunct<char>& time_c = use_facet<__timepunct<char> >(loc_c); - const __timepunct<char>& time_de = use_facet<__timepunct<char> >(loc_de); - const __timepunct<char>& time_hk = use_facet<__timepunct<char> >(loc_hk); - const __timepunct<char>& time_fr = use_facet<__timepunct<char> >(loc_fr); - const string empty; // create an ostream-derived object, cache the time_get facet @@ -60,11 +54,7 @@ void test02() ios_base::iostate errorstate = good; // create "C" time objects - const tm time_bday = { 0, 0, 12, 4, 3, 71 }; - const char* all = "%a %A %b %B %c %d %H %I %j %m %M %p %s %U " - "%w %W %x %X %y %Y %Z %%"; - const char* date = "%A, the second of %B"; - const char* date_ex = "%Ex"; + const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; // iter_type // get_date(iter_type, iter_type, ios_base&, ios_base::iostate&, tm*) const @@ -73,7 +63,6 @@ void test02() iss.imbue(loc_c); iss.str("04/04/71"); iterator_type is_it01(iss); - tm time01; errorstate = good; // inspection of named locales, de_DE diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/3.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/3.cc index 249b5e8001f..3c786116bc3 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/3.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/3.cc @@ -27,19 +27,18 @@ void test03() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; // Check time_get works with other iterators besides streambuf // input iterators. typedef string::const_iterator iter_type; typedef time_get<char, iter_type> time_get_type; const ios_base::iostate goodbit = ios_base::goodbit; - const ios_base::iostate eofbit = ios_base::eofbit; ios_base::iostate err = goodbit; const locale loc_c = locale::classic(); // Create "C" time objects - const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2 }; + const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2, 0, 0 }; tm tm1; istringstream iss; diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/1.cc index aedf8817d8c..4affdf1796a 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/1.cc @@ -30,7 +30,7 @@ void test01() typedef time_base::dateorder dateorder; typedef istreambuf_iterator<wchar_t> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction and sanity checks. locale loc_c = locale::classic(); @@ -42,12 +42,6 @@ void test01() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the __timepunct facets, for quicker gdb inspection - const __timepunct<wchar_t>& time_c = use_facet<__timepunct<wchar_t> >(loc_c); - const __timepunct<wchar_t>& time_de = use_facet<__timepunct<wchar_t> >(loc_de); - const __timepunct<wchar_t>& time_hk = use_facet<__timepunct<wchar_t> >(loc_hk); - const __timepunct<wchar_t>& time_fr = use_facet<__timepunct<wchar_t> >(loc_fr); - const wstring empty; // create an ostream-derived object, cache the time_get facet @@ -61,11 +55,7 @@ void test01() ios_base::iostate errorstate = good; // create "C" time objects - const tm time_bday = { 0, 0, 12, 4, 3, 71 }; - const wchar_t* all = L"%a %A %b %B %c %d %H %I %j %m %M %p %s %U " - L"%w %W %x %X %y %Y %Z %%"; - const wchar_t* date = L"%A, the second of %B"; - const wchar_t* date_ex = L"%Ex"; + const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; // iter_type // get_date(iter_type, iter_type, ios_base&, ios_base::iostate&, tm*) const diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/2.cc index aff0d1e74e7..59695724138 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/2.cc @@ -30,7 +30,7 @@ void test02() typedef time_base::dateorder dateorder; typedef istreambuf_iterator<wchar_t> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction and sanity checks. locale loc_c = locale::classic(); @@ -42,12 +42,6 @@ void test02() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the __timepunct facets, for quicker gdb inspection - const __timepunct<wchar_t>& time_c = use_facet<__timepunct<wchar_t> >(loc_c); - const __timepunct<wchar_t>& time_de = use_facet<__timepunct<wchar_t> >(loc_de); - const __timepunct<wchar_t>& time_hk = use_facet<__timepunct<wchar_t> >(loc_hk); - const __timepunct<wchar_t>& time_fr = use_facet<__timepunct<wchar_t> >(loc_fr); - const wstring empty; // create an ostream-derived object, cache the time_get facet @@ -60,11 +54,7 @@ void test02() ios_base::iostate errorstate = good; // create "C" time objects - const tm time_bday = { 0, 0, 12, 4, 3, 71 }; - const wchar_t* all = L"%a %A %b %B %c %d %H %I %j %m %M %p %s %U " - L"%w %W %x %X %y %Y %Z %%"; - const wchar_t* date = L"%A, the second of %B"; - const wchar_t* date_ex = L"%Ex"; + const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; // iter_type // get_date(iter_type, iter_type, ios_base&, ios_base::iostate&, tm*) const @@ -73,7 +63,6 @@ void test02() iss.imbue(loc_c); iss.str(L"04/04/71"); iterator_type is_it01(iss); - tm time01; errorstate = good; // inspection of named locales, de_DE diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/3.cc index b02049fcb46..6b4facc99f0 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/3.cc @@ -27,19 +27,18 @@ void test03() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; // Check time_get works with other iterators besides streambuf // input iterators. typedef wstring::const_iterator iter_type; typedef time_get<wchar_t, iter_type> time_get_type; const ios_base::iostate goodbit = ios_base::goodbit; - const ios_base::iostate eofbit = ios_base::eofbit; ios_base::iostate err = goodbit; const locale loc_c = locale::classic(); // Create "C" time objects - const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2 }; + const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2, 0, 0 }; tm tm1; istringstream iss; diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/1.cc index 17f52a56385..cf948c3d0d5 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/1.cc @@ -33,7 +33,7 @@ void test01() const ios_base::iostate good = ios_base::goodbit; ios_base::iostate errorstate = good; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction and sanity checks. locale loc_c = locale::classic(); @@ -45,14 +45,8 @@ void test01() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the __timepunct facets, for quicker gdb inspection - const __timepunct<char>& time_c = use_facet<__timepunct<char> >(loc_c); - const __timepunct<char>& time_de = use_facet<__timepunct<char> >(loc_de); - const __timepunct<char>& time_hk = use_facet<__timepunct<char> >(loc_hk); - const __timepunct<char>& time_fr = use_facet<__timepunct<char> >(loc_fr); - // create "C" time objects - const tm time_bday = { 0, 0, 12, 4, 3, 71 }; + const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; // iter_type // get_monthname(iter_type, iter_type, ios_base&, diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/2.cc index f9d79a43440..5f183b59fd5 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/2.cc @@ -30,7 +30,7 @@ void test02() typedef time_base::dateorder dateorder; typedef istreambuf_iterator<char> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction and sanity checks. locale loc_c = locale::classic(); @@ -42,13 +42,7 @@ void test02() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the __timepunct facets, for quicker gdb inspection - const __timepunct<char>& time_c = use_facet<__timepunct<char> >(loc_c); - const __timepunct<char>& time_de = use_facet<__timepunct<char> >(loc_de); - const __timepunct<char>& time_hk = use_facet<__timepunct<char> >(loc_hk); - const __timepunct<char>& time_fr = use_facet<__timepunct<char> >(loc_fr); - - const tm time_bday = { 0, 0, 12, 4, 3, 71 }; + const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; const string empty; diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/3.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/3.cc index c876f5c364b..970e4319706 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/3.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/3.cc @@ -27,19 +27,17 @@ void test03() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; // Check time_get works with other iterators besides streambuf // input iterators. typedef string::const_iterator iter_type; typedef time_get<char, iter_type> time_get_type; const ios_base::iostate goodbit = ios_base::goodbit; - const ios_base::iostate eofbit = ios_base::eofbit; ios_base::iostate err = goodbit; const locale loc_c = locale::classic(); // Create "C" time objects - const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2 }; tm tm1; istringstream iss; diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc index 0b86d74f996..47f5c48188a 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc @@ -33,7 +33,7 @@ void test01() const ios_base::iostate good = ios_base::goodbit; ios_base::iostate errorstate = good; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction and sanity checks. locale loc_c = locale::classic(); @@ -45,14 +45,8 @@ void test01() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the __timepunct facets, for quicker gdb inspection - const __timepunct<wchar_t>& time_c = use_facet<__timepunct<wchar_t> >(loc_c); - const __timepunct<wchar_t>& time_de = use_facet<__timepunct<wchar_t> >(loc_de); - const __timepunct<wchar_t>& time_hk = use_facet<__timepunct<wchar_t> >(loc_hk); - const __timepunct<wchar_t>& time_fr = use_facet<__timepunct<wchar_t> >(loc_fr); - // create "C" time objects - const tm time_bday = { 0, 0, 12, 4, 3, 71 }; + const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; // iter_type // get_monthname(iter_type, iter_type, ios_base&, diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc index 63689eefca3..af861cb7bfe 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc @@ -30,7 +30,7 @@ void test02() typedef time_base::dateorder dateorder; typedef istreambuf_iterator<wchar_t> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction and sanity checks. locale loc_c = locale::classic(); @@ -42,13 +42,7 @@ void test02() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the __timepunct facets, for quicker gdb inspection - const __timepunct<wchar_t>& time_c = use_facet<__timepunct<wchar_t> >(loc_c); - const __timepunct<wchar_t>& time_de = use_facet<__timepunct<wchar_t> >(loc_de); - const __timepunct<wchar_t>& time_hk = use_facet<__timepunct<wchar_t> >(loc_hk); - const __timepunct<wchar_t>& time_fr = use_facet<__timepunct<wchar_t> >(loc_fr); - - const tm time_bday = { 0, 0, 12, 4, 3, 71 }; + const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; const wstring empty; diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/3.cc index 5cb2b651a9c..24007fa3621 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/3.cc @@ -27,19 +27,17 @@ void test03() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; // Check time_get works with other iterators besides streambuf // input iterators. typedef wstring::const_iterator iter_type; typedef time_get<wchar_t, iter_type> time_get_type; const ios_base::iostate goodbit = ios_base::goodbit; - const ios_base::iostate eofbit = ios_base::eofbit; ios_base::iostate err = goodbit; const locale loc_c = locale::classic(); // Create "C" time objects - const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2 }; tm tm1; istringstream iss; diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/1.cc index 1517fe2e138..c3b3bb1c015 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/1.cc @@ -27,7 +27,7 @@ void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; typedef time_base::dateorder dateorder; typedef istreambuf_iterator<char> iterator_type; @@ -41,12 +41,6 @@ void test01() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the __timepunct facets, for quicker gdb inspection - const __timepunct<char>& time_c = use_facet<__timepunct<char> >(loc_c); - const __timepunct<char>& time_de = use_facet<__timepunct<char> >(loc_de); - const __timepunct<char>& time_hk = use_facet<__timepunct<char> >(loc_hk); - const __timepunct<char>& time_fr = use_facet<__timepunct<char> >(loc_fr); - const string empty; // create an ostream-derived object, cache the time_get facet @@ -59,11 +53,7 @@ void test01() ios_base::iostate errorstate = good; // create "C" time objects - const tm time_bday = { 0, 0, 12, 4, 3, 71 }; - const char* all = "%a %A %b %B %c %d %H %I %j %m %M %p %s %U " - "%w %W %x %X %y %Y %Z %%"; - const char* date = "%A, the second of %B"; - const char* date_ex = "%Ex"; + const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; // 2 // iter_type diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/2.cc index 9b307d7535c..7341274182e 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/2.cc @@ -27,7 +27,7 @@ void test02() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; typedef time_base::dateorder dateorder; typedef istreambuf_iterator<char> iterator_type; @@ -41,14 +41,8 @@ void test02() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the __timepunct facets, for quicker gdb inspection - const __timepunct<char>& time_c = use_facet<__timepunct<char> >(loc_c); - const __timepunct<char>& time_de = use_facet<__timepunct<char> >(loc_de); - const __timepunct<char>& time_hk = use_facet<__timepunct<char> >(loc_hk); - const __timepunct<char>& time_fr = use_facet<__timepunct<char> >(loc_fr); - const string empty; - const tm time_bday = { 0, 0, 12, 4, 3, 71 }; + const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; // create an ostream-derived object, cache the time_get facet iterator_type end; diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/3.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/3.cc index 01a06cacc28..d04ebdb7214 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/3.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/3.cc @@ -27,19 +27,18 @@ void test03() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; // Check time_get works with other iterators besides streambuf // input iterators. typedef string::const_iterator iter_type; typedef time_get<char, iter_type> time_get_type; const ios_base::iostate goodbit = ios_base::goodbit; - const ios_base::iostate eofbit = ios_base::eofbit; ios_base::iostate err = goodbit; const locale loc_c = locale::classic(); // Create "C" time objects - const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2 }; + const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2, 0, 0 }; tm tm1; istringstream iss; diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/1.cc index 00ee21e680a..bc9b3a12734 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/1.cc @@ -27,7 +27,7 @@ void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; typedef time_base::dateorder dateorder; typedef istreambuf_iterator<wchar_t> iterator_type; @@ -41,12 +41,6 @@ void test01() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the __timepunct facets, for quicker gdb inspection - const __timepunct<wchar_t>& time_c = use_facet<__timepunct<wchar_t> >(loc_c); - const __timepunct<wchar_t>& time_de = use_facet<__timepunct<wchar_t> >(loc_de); - const __timepunct<wchar_t>& time_hk = use_facet<__timepunct<wchar_t> >(loc_hk); - const __timepunct<wchar_t>& time_fr = use_facet<__timepunct<wchar_t> >(loc_fr); - const wstring empty; // create an ostream-derived object, cache the time_get facet @@ -59,11 +53,7 @@ void test01() ios_base::iostate errorstate = good; // create "C" time objects - const tm time_bday = { 0, 0, 12, 4, 3, 71 }; - const wchar_t* all = L"%a %A %b %B %c %d %H %I %j %m %M %p %s %U " - L"%w %W %x %X %y %Y %Z %%"; - const wchar_t* date = L"%A, the second of %B"; - const wchar_t* date_ex = L"%Ex"; + const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; // 2 // iter_type diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/2.cc index a412cf01011..8c75a6fd76c 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/2.cc @@ -27,7 +27,7 @@ void test02() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; typedef time_base::dateorder dateorder; typedef istreambuf_iterator<wchar_t> iterator_type; @@ -41,14 +41,8 @@ void test02() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the __timepunct facets, for quicker gdb inspection - const __timepunct<wchar_t>& time_c = use_facet<__timepunct<wchar_t> >(loc_c); - const __timepunct<wchar_t>& time_de = use_facet<__timepunct<wchar_t> >(loc_de); - const __timepunct<wchar_t>& time_hk = use_facet<__timepunct<wchar_t> >(loc_hk); - const __timepunct<wchar_t>& time_fr = use_facet<__timepunct<wchar_t> >(loc_fr); - const wstring empty; - const tm time_bday = { 0, 0, 12, 4, 3, 71 }; + const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; // create an ostream-derived object, cache the time_get facet iterator_type end; diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/3.cc index bb9c2e0b46f..f9ebf1bd0bf 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/3.cc @@ -27,19 +27,18 @@ void test03() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; // Check time_get works with other iterators besides streambuf // input iterators. typedef wstring::const_iterator iter_type; typedef time_get<wchar_t, iter_type> time_get_type; const ios_base::iostate goodbit = ios_base::goodbit; - const ios_base::iostate eofbit = ios_base::eofbit; ios_base::iostate err = goodbit; const locale loc_c = locale::classic(); // Create "C" time objects - const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2 }; + const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2, 0, 0 }; tm tm1; wistringstream iss; diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/1.cc index ecbe8ecc2d8..993592158e4 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/1.cc @@ -30,7 +30,7 @@ void test01() typedef time_base::dateorder dateorder; typedef istreambuf_iterator<char> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction and sanity checks. locale loc_c = locale::classic(); @@ -42,12 +42,6 @@ void test01() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the __timepunct facets, for quicker gdb inspection - const __timepunct<char>& time_c = use_facet<__timepunct<char> >(loc_c); - const __timepunct<char>& time_de = use_facet<__timepunct<char> >(loc_de); - const __timepunct<char>& time_hk = use_facet<__timepunct<char> >(loc_hk); - const __timepunct<char>& time_fr = use_facet<__timepunct<char> >(loc_fr); - const string empty; // create an ostream-derived object, cache the time_get facet @@ -61,11 +55,7 @@ void test01() ios_base::iostate errorstate = good; // create "C" time objects - const tm time_bday = { 0, 0, 12, 4, 3, 71 }; - const char* all = "%a %A %b %B %c %d %H %I %j %m %M %p %s %U " - "%w %W %x %X %y %Y %Z %%"; - const char* date = "%A, the second of %B"; - const char* date_ex = "%Ex"; + const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; // iter_type // get_weekday(iter_type, iter_type, ios_base&, diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/2.cc index e423be62572..93151dfa324 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/2.cc @@ -30,7 +30,7 @@ void test02() typedef time_base::dateorder dateorder; typedef istreambuf_iterator<char> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction and sanity checks. locale loc_c = locale::classic(); @@ -42,12 +42,6 @@ void test02() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the __timepunct facets, for quicker gdb inspection - const __timepunct<char>& time_c = use_facet<__timepunct<char> >(loc_c); - const __timepunct<char>& time_de = use_facet<__timepunct<char> >(loc_de); - const __timepunct<char>& time_hk = use_facet<__timepunct<char> >(loc_hk); - const __timepunct<char>& time_fr = use_facet<__timepunct<char> >(loc_fr); - const string empty; // create an ostream-derived object, cache the time_get facet @@ -60,7 +54,7 @@ void test02() ios_base::iostate errorstate = good; // create "C" time objects - const tm time_bday = { 0, 0, 12, 4, 3, 71 }; + const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; // inspection of named locales, de_DE iss.imbue(loc_de); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/3.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/3.cc index 59dde862a35..09a969a1f1d 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/3.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/3.cc @@ -27,19 +27,18 @@ void test03() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; // Check time_get works with other iterators besides streambuf // input iterators. typedef string::const_iterator iter_type; typedef time_get<char, iter_type> time_get_type; const ios_base::iostate goodbit = ios_base::goodbit; - const ios_base::iostate eofbit = ios_base::eofbit; ios_base::iostate err = goodbit; const locale loc_c = locale::classic(); // Create "C" time objects - const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2 }; + const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2, 0, 0 }; tm tm1; istringstream iss; diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc index dca85d24fd2..065b13cf788 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc @@ -30,7 +30,7 @@ void test01() typedef time_base::dateorder dateorder; typedef istreambuf_iterator<wchar_t> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction and sanity checks. locale loc_c = locale::classic(); @@ -42,12 +42,6 @@ void test01() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the __timepunct facets, for quicker gdb inspection - const __timepunct<wchar_t>& time_c = use_facet<__timepunct<wchar_t> >(loc_c); - const __timepunct<wchar_t>& time_de = use_facet<__timepunct<wchar_t> >(loc_de); - const __timepunct<wchar_t>& time_hk = use_facet<__timepunct<wchar_t> >(loc_hk); - const __timepunct<wchar_t>& time_fr = use_facet<__timepunct<wchar_t> >(loc_fr); - const wstring empty; // create an ostream-derived object, cache the time_get facet @@ -61,11 +55,7 @@ void test01() ios_base::iostate errorstate = good; // create "C" time objects - const tm time_bday = { 0, 0, 12, 4, 3, 71 }; - const wchar_t* all = L"%a %A %b %B %c %d %H %I %j %m %M %p %s %U " - L"%w %W %x %X %y %Y %Z %%"; - const wchar_t* date = L"%A, the second of %B"; - const wchar_t* date_ex = L"%Ex"; + const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; // iter_type // get_weekday(iter_type, iter_type, ios_base&, diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc index 1ca267440e7..1bf98971214 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc @@ -30,7 +30,7 @@ void test02() typedef time_base::dateorder dateorder; typedef istreambuf_iterator<wchar_t> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction and sanity checks. locale loc_c = locale::classic(); @@ -42,12 +42,6 @@ void test02() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the __timepunct facets, for quicker gdb inspection - const __timepunct<wchar_t>& time_c = use_facet<__timepunct<wchar_t> >(loc_c); - const __timepunct<wchar_t>& time_de = use_facet<__timepunct<wchar_t> >(loc_de); - const __timepunct<wchar_t>& time_hk = use_facet<__timepunct<wchar_t> >(loc_hk); - const __timepunct<wchar_t>& time_fr = use_facet<__timepunct<wchar_t> >(loc_fr); - const wstring empty; // create an ostream-derived object, cache the time_get facet @@ -60,7 +54,7 @@ void test02() ios_base::iostate errorstate = good; // create "C" time objects - const tm time_bday = { 0, 0, 12, 4, 3, 71 }; + const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; // inspection of named locales, de_DE iss.imbue(loc_de); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/3.cc index eab0343be37..83b8579f270 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/3.cc @@ -27,19 +27,18 @@ void test03() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; // Check time_get works with other iterators besides streambuf // input iterators. typedef wstring::const_iterator iter_type; typedef time_get<wchar_t, iter_type> time_get_type; const ios_base::iostate goodbit = ios_base::goodbit; - const ios_base::iostate eofbit = ios_base::eofbit; ios_base::iostate err = goodbit; const locale loc_c = locale::classic(); // Create "C" time objects - const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2 }; + const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2, 0, 0 }; tm tm1; wistringstream iss; diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/1.cc index d0aea858ae7..1ae3d4ee3fc 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/1.cc @@ -30,7 +30,7 @@ void test01() typedef time_base::dateorder dateorder; typedef istreambuf_iterator<char> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction and sanity checks. locale loc_c = locale::classic(); @@ -42,12 +42,6 @@ void test01() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the __timepunct facets, for quicker gdb inspection - const __timepunct<char>& time_c = use_facet<__timepunct<char> >(loc_c); - const __timepunct<char>& time_de = use_facet<__timepunct<char> >(loc_de); - const __timepunct<char>& time_hk = use_facet<__timepunct<char> >(loc_hk); - const __timepunct<char>& time_fr = use_facet<__timepunct<char> >(loc_fr); - const string empty; // create an ostream-derived object, cache the time_get facet @@ -61,11 +55,7 @@ void test01() ios_base::iostate errorstate = good; // create "C" time objects - const tm time_bday = { 0, 0, 12, 4, 3, 71 }; - const char* all = "%a %A %b %B %c %d %H %I %j %m %M %p %s %U " - "%w %W %x %X %y %Y %Z %%"; - const char* date = "%A, the second of %B"; - const char* date_ex = "%Ex"; + const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; // iter_type // get_year(iter_type, iter_type, ios_base&, ios_base::iostate&, tm*) const diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/3.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/3.cc index 1c38fcb3884..4efb3ac6500 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/3.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/3.cc @@ -27,19 +27,18 @@ void test03() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; // Check time_get works with other iterators besides streambuf // input iterators. typedef string::const_iterator iter_type; typedef time_get<char, iter_type> time_get_type; const ios_base::iostate goodbit = ios_base::goodbit; - const ios_base::iostate eofbit = ios_base::eofbit; ios_base::iostate err = goodbit; const locale loc_c = locale::classic(); // Create "C" time objects - const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2 }; + const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2, 0, 0 }; tm tm1; istringstream iss; diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/1.cc index f8158957272..5aa77c9519f 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/1.cc @@ -30,7 +30,7 @@ void test01() typedef time_base::dateorder dateorder; typedef istreambuf_iterator<wchar_t> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // basic construction and sanity checks. locale loc_c = locale::classic(); @@ -42,12 +42,6 @@ void test01() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the __timepunct facets, for quicker gdb inspection - const __timepunct<wchar_t>& time_c = use_facet<__timepunct<wchar_t> >(loc_c); - const __timepunct<wchar_t>& time_de = use_facet<__timepunct<wchar_t> >(loc_de); - const __timepunct<wchar_t>& time_hk = use_facet<__timepunct<wchar_t> >(loc_hk); - const __timepunct<wchar_t>& time_fr = use_facet<__timepunct<wchar_t> >(loc_fr); - const wstring empty; // create an ostream-derived object, cache the time_get facet @@ -61,11 +55,7 @@ void test01() ios_base::iostate errorstate = good; // create "C" time objects - const tm time_bday = { 0, 0, 12, 4, 3, 71 }; - const wchar_t* all = L"%a %A %b %B %c %d %H %I %j %m %M %p %s %U " - L"%w %W %x %X %y %Y %Z %%"; - const wchar_t* date = L"%A, the second of %B"; - const wchar_t* date_ex = L"%Ex"; + const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; // iter_type // get_year(iter_type, iter_type, ios_base&, ios_base::iostate&, tm*) const diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/3.cc index 0f61392df09..8377b463f2d 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/3.cc @@ -27,19 +27,18 @@ void test03() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; // Check time_get works with other iterators besides streambuf // input iterators. typedef wstring::const_iterator iter_type; typedef time_get<wchar_t, iter_type> time_get_type; const ios_base::iostate goodbit = ios_base::goodbit; - const ios_base::iostate eofbit = ios_base::eofbit; ios_base::iostate err = goodbit; const locale loc_c = locale::classic(); // Create "C" time objects - const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2 }; + const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2, 0, 0 }; tm tm1; istringstream iss; diff --git a/libstdc++-v3/testsuite/22_locale/time_put/1.cc b/libstdc++-v3/testsuite/22_locale/time_put/1.cc index a1ce9ac60fa..0606521abe5 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/1.cc @@ -29,7 +29,7 @@ void test01() typedef std::time_put<char> test_type; typedef std::locale::facet base_type; const test_type& obj = std::use_facet<test_type>(std::locale()); - const base_type* base = &obj; + const base_type* base __attribute__((unused)) = &obj; // Check for required typedefs typedef test_type::char_type char_type; diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/1.cc index b547034f7a0..471806cea5f 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/1.cc @@ -29,14 +29,10 @@ void test01() using namespace std; typedef ostreambuf_iterator<char> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // create "C" time objects - tm time1 = { 0, 0, 12, 4, 3, 71 }; - const char* all = "%a %A %b %B %c %d %H %I %j %m %M %p %s %U " - "%w %W %x %X %y %Y %Z %%"; - const char* date = "%A, the second of %B"; - const char* date_ex = "%Ex"; + tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; // basic construction and sanity checks. locale loc_c = locale::classic(); @@ -48,12 +44,6 @@ void test01() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the __timepunct facets, for quicker gdb inspection - const __timepunct<char>& time_c = use_facet<__timepunct<char> >(loc_c); - const __timepunct<char>& time_de = use_facet<__timepunct<char> >(loc_de); - const __timepunct<char>& time_hk = use_facet<__timepunct<char> >(loc_hk); - const __timepunct<char>& time_fr = use_facet<__timepunct<char> >(loc_fr); - // create an ostream-derived object, cache the time_put facet const string empty; ostringstream oss; diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/10.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/10.cc index 82d00538ed8..c637b829d61 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/10.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/10.cc @@ -27,7 +27,7 @@ void test10() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; // Check time_put works with other iterators besides streambuf // output iterators. (As long as output_iterator requirements are met.) @@ -41,7 +41,6 @@ void test10() const string x(50, 'x'); // have to have allocated string! string res; const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2 }; - const char* date = "%X, %A, the second of %B, %Y"; ostringstream oss; oss.imbue(locale(loc_c, new time_put_type)); diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/2.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/2.cc index eb844f16209..c09c11ec608 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/2.cc @@ -29,14 +29,10 @@ void test02() using namespace std; typedef ostreambuf_iterator<char> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // create "C" time objects - tm time1 = { 0, 0, 12, 4, 3, 71 }; - const char* all = "%a %A %b %B %c %d %H %I %j %m %M %p %s %U " - "%w %W %x %X %y %Y %Z %%"; - const char* date = "%A, the second of %B"; - const char* date_ex = "%Ex"; + tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; // basic construction and sanity checks. locale loc_c = locale::classic(); @@ -48,12 +44,6 @@ void test02() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the __timepunct facets, for quicker gdb inspection - const __timepunct<char>& time_c = use_facet<__timepunct<char> >(loc_c); - const __timepunct<char>& time_de = use_facet<__timepunct<char> >(loc_de); - const __timepunct<char>& time_hk = use_facet<__timepunct<char> >(loc_hk); - const __timepunct<char>& time_fr = use_facet<__timepunct<char> >(loc_fr); - // create an ostream-derived object, cache the time_put facet const string empty; ostringstream oss; diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/3.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/3.cc index 522a899ef38..12633742505 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/3.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/3.cc @@ -29,14 +29,10 @@ void test03() using namespace std; typedef ostreambuf_iterator<char> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // create "C" time objects - tm time1 = { 0, 0, 12, 4, 3, 71 }; - const char* all = "%a %A %b %B %c %d %H %I %j %m %M %p %s %U " - "%w %W %x %X %y %Y %Z %%"; - const char* date = "%A, the second of %B"; - const char* date_ex = "%Ex"; + tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; // basic construction and sanity checks. locale loc_c = locale::classic(); @@ -48,12 +44,6 @@ void test03() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the __timepunct facets, for quicker gdb inspection - const __timepunct<char>& time_c = use_facet<__timepunct<char> >(loc_c); - const __timepunct<char>& time_de = use_facet<__timepunct<char> >(loc_de); - const __timepunct<char>& time_hk = use_facet<__timepunct<char> >(loc_hk); - const __timepunct<char>& time_fr = use_facet<__timepunct<char> >(loc_fr); - // create an ostream-derived object, cache the time_put facet const string empty; ostringstream oss; diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/4.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/4.cc index 8c9b1e0f492..3a99df30979 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/4.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/4.cc @@ -29,14 +29,10 @@ void test04() using namespace std; typedef ostreambuf_iterator<char> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // create "C" time objects - tm time1 = { 0, 0, 12, 4, 3, 71 }; - const char* all = "%a %A %b %B %c %d %H %I %j %m %M %p %s %U " - "%w %W %x %X %y %Y %Z %%"; - const char* date = "%A, the second of %B"; - const char* date_ex = "%Ex"; + tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; // basic construction and sanity checks. locale loc_c = locale::classic(); @@ -48,12 +44,6 @@ void test04() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the __timepunct facets, for quicker gdb inspection - const __timepunct<char>& time_c = use_facet<__timepunct<char> >(loc_c); - const __timepunct<char>& time_de = use_facet<__timepunct<char> >(loc_de); - const __timepunct<char>& time_hk = use_facet<__timepunct<char> >(loc_hk); - const __timepunct<char>& time_fr = use_facet<__timepunct<char> >(loc_fr); - // create an ostream-derived object, cache the time_put facet const string empty; ostringstream oss; diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/5.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/5.cc index 9376987050e..64ca142fa09 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/5.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/5.cc @@ -30,12 +30,10 @@ void test05() typedef ostreambuf_iterator<char> iterator_type; typedef char_traits<char> traits; - bool test = true; + bool test __attribute__((unused)) = true; // create "C" time objects - tm time1 = { 0, 0, 12, 4, 3, 71 }; - const char* all = "%a %A %b %B %c %d %H %I %j %m %M %p %s %U " - "%w %W %x %X %y %Y %Z %%"; + tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; const char* date = "%A, the second of %B"; const char* date_ex = "%Ex"; @@ -49,12 +47,6 @@ void test05() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the __timepunct facets, for quicker gdb inspection - const __timepunct<char>& time_c = use_facet<__timepunct<char> >(loc_c); - const __timepunct<char>& time_de = use_facet<__timepunct<char> >(loc_de); - const __timepunct<char>& time_hk = use_facet<__timepunct<char> >(loc_hk); - const __timepunct<char>& time_fr = use_facet<__timepunct<char> >(loc_fr); - // create an ostream-derived object, cache the time_put facet const string empty; ostringstream oss; diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/6.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/6.cc index e0ea595f08d..53baf21afd4 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/6.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/6.cc @@ -30,12 +30,10 @@ void test06() typedef ostreambuf_iterator<char> iterator_type; typedef char_traits<char> traits; - bool test = true; + bool test __attribute__((unused)) = true; // create "C" time objects - tm time1 = { 0, 0, 12, 4, 3, 71 }; - const char* all = "%a %A %b %B %c %d %H %I %j %m %M %p %s %U " - "%w %W %x %X %y %Y %Z %%"; + tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; const char* date = "%A, the second of %B"; const char* date_ex = "%Ex"; @@ -49,12 +47,6 @@ void test06() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the __timepunct facets, for quicker gdb inspection - const __timepunct<char>& time_c = use_facet<__timepunct<char> >(loc_c); - const __timepunct<char>& time_de = use_facet<__timepunct<char> >(loc_de); - const __timepunct<char>& time_hk = use_facet<__timepunct<char> >(loc_hk); - const __timepunct<char>& time_fr = use_facet<__timepunct<char> >(loc_fr); - // create an ostream-derived object, cache the time_put facet const string empty; ostringstream oss; diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/7.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/7.cc index 1f37a24a16f..e8aeea2e623 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/7.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/7.cc @@ -30,12 +30,10 @@ void test07() typedef ostreambuf_iterator<char> iterator_type; typedef char_traits<char> traits; - bool test = true; + bool test __attribute__((unused)) = true; // create "C" time objects - tm time1 = { 0, 0, 12, 4, 3, 71 }; - const char* all = "%a %A %b %B %c %d %H %I %j %m %M %p %s %U " - "%w %W %x %X %y %Y %Z %%"; + tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; const char* date = "%A, the second of %B"; const char* date_ex = "%Ex"; @@ -50,12 +48,6 @@ void test07() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the __timepunct facets, for quicker gdb inspection - const __timepunct<char>& time_c = use_facet<__timepunct<char> >(loc_c); - const __timepunct<char>& time_de = use_facet<__timepunct<char> >(loc_de); - const __timepunct<char>& time_hk = use_facet<__timepunct<char> >(loc_hk); - const __timepunct<char>& time_fr = use_facet<__timepunct<char> >(loc_fr); - // create an ostream-derived object, cache the time_put facet const string empty; ostringstream oss; diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/8.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/8.cc index b047ed96547..b940f2aa0c4 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/8.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/8.cc @@ -30,12 +30,10 @@ void test08() typedef ostreambuf_iterator<char> iterator_type; typedef char_traits<char> traits; - bool test = true; + bool test __attribute__((unused)) = true; // create "C" time objects - tm time1 = { 0, 0, 12, 4, 3, 71 }; - const char* all = "%a %A %b %B %c %d %H %I %j %m %M %p %s %U " - "%w %W %x %X %y %Y %Z %%"; + tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; const char* date = "%A, the second of %B"; const char* date_ex = "%Ex"; @@ -49,12 +47,6 @@ void test08() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the __timepunct facets, for quicker gdb inspection - const __timepunct<char>& time_c = use_facet<__timepunct<char> >(loc_c); - const __timepunct<char>& time_de = use_facet<__timepunct<char> >(loc_de); - const __timepunct<char>& time_hk = use_facet<__timepunct<char> >(loc_hk); - const __timepunct<char>& time_fr = use_facet<__timepunct<char> >(loc_fr); - // create an ostream-derived object, cache the time_put facet const string empty; ostringstream oss; diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/9.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/9.cc index 42cfb34b053..9e43b85fc8e 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/9.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/9.cc @@ -27,7 +27,7 @@ void test09() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; // Check time_put works with other iterators besides streambuf // output iterators. (As long as output_iterator requirements are met.) diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/1.cc index c6f36b732f0..9f1b11d76aa 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/1.cc @@ -29,14 +29,10 @@ void test01() using namespace std; typedef ostreambuf_iterator<wchar_t> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // create "C" time objects - tm time1 = { 0, 0, 12, 4, 3, 71 }; - const wchar_t* all = L"%a %A %b %B %c %d %H %I %j %m %M %p %s %U " - L"%w %W %x %X %y %Y %Z %%"; - const wchar_t* date = L"%A, the second of %B"; - const wchar_t* date_ex = L"%Ex"; + tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; // basic construction and sanity checks. locale loc_c = locale::classic(); @@ -48,12 +44,6 @@ void test01() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the __timepunct facets, for quicker gdb inspection - const __timepunct<wchar_t>& time_c = use_facet<__timepunct<wchar_t> >(loc_c); - const __timepunct<wchar_t>& time_de = use_facet<__timepunct<wchar_t> >(loc_de); - const __timepunct<wchar_t>& time_hk = use_facet<__timepunct<wchar_t> >(loc_hk); - const __timepunct<wchar_t>& time_fr = use_facet<__timepunct<wchar_t> >(loc_fr); - // create an ostream-derived object, cache the time_put facet const wstring empty; wostringstream oss; diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/10.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/10.cc index 9cd5db73a5f..c16555f89ee 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/10.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/10.cc @@ -27,7 +27,7 @@ void test10() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; // Check time_put works with other iterators besides streambuf // output iterators. (As long as output_iterator requirements are met.) @@ -41,7 +41,6 @@ void test10() const wstring x(50, 'x'); // have to have allocated wstring! wstring res; const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2 }; - const wchar_t* date = L"%X, %A, the second of %B, %Y"; wostringstream oss; oss.imbue(locale(loc_c, new time_put_type)); diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/2.cc index 67ce4a344d1..62751ffc457 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/2.cc @@ -29,14 +29,10 @@ void test02() using namespace std; typedef ostreambuf_iterator<wchar_t> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // create "C" time objects - tm time1 = { 0, 0, 12, 4, 3, 71 }; - const wchar_t* all = L"%a %A %b %B %c %d %H %I %j %m %M %p %s %U " - L"%w %W %x %X %y %Y %Z %%"; - const wchar_t* date = L"%A, the second of %B"; - const wchar_t* date_ex = L"%Ex"; + tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; // basic construction and sanity checks. locale loc_c = locale::classic(); @@ -48,12 +44,6 @@ void test02() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the __timepunct facets, for quicker gdb inspection - const __timepunct<wchar_t>& time_c = use_facet<__timepunct<wchar_t> >(loc_c); - const __timepunct<wchar_t>& time_de = use_facet<__timepunct<wchar_t> >(loc_de); - const __timepunct<wchar_t>& time_hk = use_facet<__timepunct<wchar_t> >(loc_hk); - const __timepunct<wchar_t>& time_fr = use_facet<__timepunct<wchar_t> >(loc_fr); - // create an ostream-derived object, cache the time_put facet const wstring empty; wostringstream oss; diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/3.cc index c0ecf6acef3..06d51d96297 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/3.cc @@ -29,14 +29,10 @@ void test03() using namespace std; typedef ostreambuf_iterator<wchar_t> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // create "C" time objects - tm time1 = { 0, 0, 12, 4, 3, 71 }; - const wchar_t* all = L"%a %A %b %B %c %d %H %I %j %m %M %p %s %U " - L"%w %W %x %X %y %Y %Z %%"; - const wchar_t* date = L"%A, the second of %B"; - const wchar_t* date_ex = L"%Ex"; + tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; // basic construction and sanity checks. locale loc_c = locale::classic(); @@ -48,12 +44,6 @@ void test03() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the __timepunct facets, for quicker gdb inspection - const __timepunct<wchar_t>& time_c = use_facet<__timepunct<wchar_t> >(loc_c); - const __timepunct<wchar_t>& time_de = use_facet<__timepunct<wchar_t> >(loc_de); - const __timepunct<wchar_t>& time_hk = use_facet<__timepunct<wchar_t> >(loc_hk); - const __timepunct<wchar_t>& time_fr = use_facet<__timepunct<wchar_t> >(loc_fr); - // create an ostream-derived object, cache the time_put facet const wstring empty; wostringstream oss; diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/4.cc index 6206ff57734..4a8b27b5adf 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/4.cc @@ -29,14 +29,10 @@ void test04() using namespace std; typedef ostreambuf_iterator<wchar_t> iterator_type; - bool test = true; + bool test __attribute__((unused)) = true; // create "C" time objects - tm time1 = { 0, 0, 12, 4, 3, 71 }; - const wchar_t* all = L"%a %A %b %B %c %d %H %I %j %m %M %p %s %U " - L"%w %W %x %X %y %Y %Z %%"; - const wchar_t* date = L"%A, the second of %B"; - const wchar_t* date_ex = L"%Ex"; + tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; // basic construction and sanity checks. locale loc_c = locale::classic(); @@ -48,12 +44,6 @@ void test04() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the __timepunct facets, for quicker gdb inspection - const __timepunct<wchar_t>& time_c = use_facet<__timepunct<wchar_t> >(loc_c); - const __timepunct<wchar_t>& time_de = use_facet<__timepunct<wchar_t> >(loc_de); - const __timepunct<wchar_t>& time_hk = use_facet<__timepunct<wchar_t> >(loc_hk); - const __timepunct<wchar_t>& time_fr = use_facet<__timepunct<wchar_t> >(loc_fr); - // create an ostream-derived object, cache the time_put facet const wstring empty; wostringstream oss; diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/5.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/5.cc index b017d420549..0a65f3a4d43 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/5.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/5.cc @@ -30,12 +30,10 @@ void test05() typedef ostreambuf_iterator<wchar_t> iterator_type; typedef char_traits<wchar_t> traits; - bool test = true; + bool test __attribute__((unused)) = true; // create "C" time objects - tm time1 = { 0, 0, 12, 4, 3, 71 }; - const wchar_t* all = L"%a %A %b %B %c %d %H %I %j %m %M %p %s %U " - L"%w %W %x %X %y %Y %Z %%"; + tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; const wchar_t* date = L"%A, the second of %B"; const wchar_t* date_ex = L"%Ex"; @@ -49,12 +47,6 @@ void test05() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the __timepunct facets, for quicker gdb inspection - const __timepunct<wchar_t>& time_c = use_facet<__timepunct<wchar_t> >(loc_c); - const __timepunct<wchar_t>& time_de = use_facet<__timepunct<wchar_t> >(loc_de); - const __timepunct<wchar_t>& time_hk = use_facet<__timepunct<wchar_t> >(loc_hk); - const __timepunct<wchar_t>& time_fr = use_facet<__timepunct<wchar_t> >(loc_fr); - // create an ostream-derived object, cache the time_put facet const wstring empty; wostringstream oss; diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/6.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/6.cc index 8bb5b237d66..f4755bd1962 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/6.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/6.cc @@ -30,12 +30,10 @@ void test06() typedef ostreambuf_iterator<wchar_t> iterator_type; typedef char_traits<wchar_t> traits; - bool test = true; + bool test __attribute__((unused)) = true; // create "C" time objects - tm time1 = { 0, 0, 12, 4, 3, 71 }; - const wchar_t* all = L"%a %A %b %B %c %d %H %I %j %m %M %p %s %U " - L"%w %W %x %X %y %Y %Z %%"; + tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; const wchar_t* date = L"%A, the second of %B"; const wchar_t* date_ex = L"%Ex"; @@ -49,12 +47,6 @@ void test06() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the __timepunct facets, for quicker gdb inspection - const __timepunct<wchar_t>& time_c = use_facet<__timepunct<wchar_t> >(loc_c); - const __timepunct<wchar_t>& time_de = use_facet<__timepunct<wchar_t> >(loc_de); - const __timepunct<wchar_t>& time_hk = use_facet<__timepunct<wchar_t> >(loc_hk); - const __timepunct<wchar_t>& time_fr = use_facet<__timepunct<wchar_t> >(loc_fr); - // create an ostream-derived object, cache the time_put facet const wstring empty; wostringstream oss; diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/7.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/7.cc index 354285e35ca..99faf619886 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/7.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/7.cc @@ -30,12 +30,10 @@ void test07() typedef ostreambuf_iterator<wchar_t> iterator_type; typedef char_traits<wchar_t> traits; - bool test = true; + bool test __attribute__((unused)) = true; // create "C" time objects - tm time1 = { 0, 0, 12, 4, 3, 71 }; - const wchar_t* all = L"%a %A %b %B %c %d %H %I %j %m %M %p %s %U " - L"%w %W %x %X %y %Y %Z %%"; + tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; const wchar_t* date = L"%A, the second of %B"; const wchar_t* date_ex = L"%Ex"; @@ -49,12 +47,6 @@ void test07() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the __timepunct facets, for quicker gdb inspection - const __timepunct<wchar_t>& time_c = use_facet<__timepunct<wchar_t> >(loc_c); - const __timepunct<wchar_t>& time_de = use_facet<__timepunct<wchar_t> >(loc_de); - const __timepunct<wchar_t>& time_hk = use_facet<__timepunct<wchar_t> >(loc_hk); - const __timepunct<wchar_t>& time_fr = use_facet<__timepunct<wchar_t> >(loc_fr); - // create an ostream-derived object, cache the time_put facet const wstring empty; wostringstream oss; diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/8.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/8.cc index 6367a8edd27..0a7ff3c4372 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/8.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/8.cc @@ -30,12 +30,10 @@ void test08() typedef ostreambuf_iterator<wchar_t> iterator_type; typedef char_traits<wchar_t> traits; - bool test = true; + bool test __attribute__((unused)) = true; // create "C" time objects - tm time1 = { 0, 0, 12, 4, 3, 71 }; - const wchar_t* all = L"%a %A %b %B %c %d %H %I %j %m %M %p %s %U " - L"%w %W %x %X %y %Y %Z %%"; + tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; const wchar_t* date = L"%A, the second of %B"; const wchar_t* date_ex = L"%Ex"; @@ -49,12 +47,6 @@ void test08() VERIFY( loc_hk != loc_de ); VERIFY( loc_de != loc_fr ); - // cache the __timepunct facets, for quicker gdb inspection - const __timepunct<wchar_t>& time_c = use_facet<__timepunct<wchar_t> >(loc_c); - const __timepunct<wchar_t>& time_de = use_facet<__timepunct<wchar_t> >(loc_de); - const __timepunct<wchar_t>& time_hk = use_facet<__timepunct<wchar_t> >(loc_hk); - const __timepunct<wchar_t>& time_fr = use_facet<__timepunct<wchar_t> >(loc_fr); - // create an ostream-derived object, cache the time_put facet const wstring empty; wostringstream oss; diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/9.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/9.cc index 072e4c38e02..ca6676acf63 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/9.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/9.cc @@ -27,7 +27,7 @@ void test09() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; // Check time_put works with other iterators besides streambuf // output iterators. (As long as output_iterator requirements are met.) diff --git a/libstdc++-v3/testsuite/23_containers/bitset/cons/1.cc b/libstdc++-v3/testsuite/23_containers/bitset/cons/1.cc index 5d5064de4d6..9c802d322ab 100644 --- a/libstdc++-v3/testsuite/23_containers/bitset/cons/1.cc +++ b/libstdc++-v3/testsuite/23_containers/bitset/cons/1.cc @@ -27,12 +27,12 @@ bool test01(void) { - bool test = true; + bool test __attribute__((unused)) = true; // bitset() const size_t n1 = 5; std::bitset<n1> bit01; - for (int i = 0; i < n1; ++i) + for (size_t i = 0; i < n1; ++i) VERIFY( !bit01.test(i) ); // bitset(unsigned long) diff --git a/libstdc++-v3/testsuite/23_containers/bitset/cons/6282.cc b/libstdc++-v3/testsuite/23_containers/bitset/cons/6282.cc index 92f9695ab47..929ed4bda2c 100644 --- a/libstdc++-v3/testsuite/23_containers/bitset/cons/6282.cc +++ b/libstdc++-v3/testsuite/23_containers/bitset/cons/6282.cc @@ -30,7 +30,7 @@ bool test02(void) { using std::char_traits; using std::allocator; - bool test = true; + bool test __attribute__((unused)) = true; std::bitset<0> z1; VERIFY( z1.any() == false ); diff --git a/libstdc++-v3/testsuite/23_containers/bitset/operations/1.cc b/libstdc++-v3/testsuite/23_containers/bitset/operations/1.cc index 8d21a9f5521..ea3da885eb6 100644 --- a/libstdc++-v3/testsuite/23_containers/bitset/operations/1.cc +++ b/libstdc++-v3/testsuite/23_containers/bitset/operations/1.cc @@ -58,7 +58,7 @@ shift_arrays(size_t shift_step, size_t size) { template <size_t size> bool do_test() { - bool test = true; + bool test __attribute__((unused)) = true; std::bitset<size> shifted; std::bitset<size> correct; @@ -89,7 +89,7 @@ template <size_t size> bool test01() { - bool test = true; + bool test __attribute__((unused)) = true; VERIFY( do_test<32>() ); VERIFY( do_test<48>() ); diff --git a/libstdc++-v3/testsuite/23_containers/bitset/operations/2.cc b/libstdc++-v3/testsuite/23_containers/bitset/operations/2.cc index fd5c1929b13..14910637482 100644 --- a/libstdc++-v3/testsuite/23_containers/bitset/operations/2.cc +++ b/libstdc++-v3/testsuite/23_containers/bitset/operations/2.cc @@ -26,7 +26,7 @@ bool test02() { - bool test = true; + bool test __attribute__((unused)) = true; std::bitset<66> b; b <<= 400; diff --git a/libstdc++-v3/testsuite/23_containers/bitset/test/1.cc b/libstdc++-v3/testsuite/23_containers/bitset/test/1.cc index 40f4f42d8ea..6e945d69768 100644 --- a/libstdc++-v3/testsuite/23_containers/bitset/test/1.cc +++ b/libstdc++-v3/testsuite/23_containers/bitset/test/1.cc @@ -28,13 +28,13 @@ void test01(void) { - bool test = true; + bool test __attribute__((unused)) = true; const size_t n1 = 5; // the other 22 member functions should be in here too... try { std::bitset<n1> five_bits; - bool unused = five_bits.test(n1); // should throw + bool unused __attribute__((unused)) = five_bits.test(n1); // should throw VERIFY( false ); } catch(std::out_of_range& fail) { diff --git a/libstdc++-v3/testsuite/23_containers/bitset/to_ulong/1.cc b/libstdc++-v3/testsuite/23_containers/bitset/to_ulong/1.cc index 40e54efbde6..3536b9dd7d3 100644 --- a/libstdc++-v3/testsuite/23_containers/bitset/to_ulong/1.cc +++ b/libstdc++-v3/testsuite/23_containers/bitset/to_ulong/1.cc @@ -27,7 +27,7 @@ void test03() { - bool test = true; + bool test __attribute__((unused)) = true; std::bitset<5> b; std::stringstream ss("101"); ss.exceptions(std::ios_base::eofbit); diff --git a/libstdc++-v3/testsuite/23_containers/deque/cons/1.cc b/libstdc++-v3/testsuite/23_containers/deque/cons/1.cc index 92e94057a98..566461b7d10 100644 --- a/libstdc++-v3/testsuite/23_containers/deque/cons/1.cc +++ b/libstdc++-v3/testsuite/23_containers/deque/cons/1.cc @@ -28,7 +28,7 @@ typedef std::deque<__gnu_test::counter> gdeque; -bool test = true; +bool test __attribute__((unused)) = true; // see http://gcc.gnu.org/ml/libstdc++/2001-11/msg00139.html void diff --git a/libstdc++-v3/testsuite/23_containers/deque/cons/2.cc b/libstdc++-v3/testsuite/23_containers/deque/cons/2.cc index bc5a180fc19..e0e7108d20b 100644 --- a/libstdc++-v3/testsuite/23_containers/deque/cons/2.cc +++ b/libstdc++-v3/testsuite/23_containers/deque/cons/2.cc @@ -36,7 +36,7 @@ using __gnu_test::destructor; typedef std::deque<counter> gdeque; -bool test = true; +bool test __attribute__((unused)) = true; // 23.2.1 required types // @@ -169,10 +169,10 @@ copyConstructorCheck() typedef copy_tracker T; typedef std::deque<T> X; - const int copyBaseSize = 17; // arbitrary + const std::size_t copyBaseSize = 17; // arbitrary X a; - for (int i = 0; i < copyBaseSize; ++i) + for (std::size_t i = 0; i < copyBaseSize; ++i) a.push_back(i); copy_tracker::reset(); @@ -180,7 +180,7 @@ copyConstructorCheck() VERIFY(!a.empty()); VERIFY(copyBaseSize == a.size()); VERIFY(a.begin() != a.end()); - VERIFY(copyBaseSize == std::distance(a.begin(), a.end())); + VERIFY( copyBaseSize == static_cast<std::size_t>(std::distance(a.begin(), a.end())) ); // run test X u = a; @@ -237,8 +237,8 @@ fillConstructorCheck2() typedef copy_tracker T; typedef std::deque<T> X; - const int f = 23; - const int l = 111; + const std::size_t f = 23; + const std::size_t l = 111; copy_tracker::reset(); @@ -455,7 +455,7 @@ test_default_ctor_exception_safety() try { X a(7); - VERIFY(("no exception thrown", false)); + VERIFY( false ); } catch (...) { @@ -486,7 +486,7 @@ test_copy_ctor_exception_safety() try { X u(a); - VERIFY(("no exception thrown", false)); + VERIFY(false); } catch (...) { diff --git a/libstdc++-v3/testsuite/23_containers/deque/operators/1.cc b/libstdc++-v3/testsuite/23_containers/deque/operators/1.cc index 5463b47f1cb..4b7aac9ab60 100644 --- a/libstdc++-v3/testsuite/23_containers/deque/operators/1.cc +++ b/libstdc++-v3/testsuite/23_containers/deque/operators/1.cc @@ -26,7 +26,7 @@ // libstdc++/6503 void test01() { - bool test = true; + bool test __attribute__((unused)) = true; std::deque<int> d(2); typedef std::deque<int>::iterator iter; @@ -59,7 +59,7 @@ void test01() // libstdc++/7186 void test02() { - bool test = true; + bool test __attribute__((unused)) = true; std::deque<int> d(2); typedef std::deque<int>::iterator iter; diff --git a/libstdc++-v3/testsuite/23_containers/list/capacity/1.cc b/libstdc++-v3/testsuite/23_containers/list/capacity/1.cc index e675760cb93..609b92c8252 100644 --- a/libstdc++-v3/testsuite/23_containers/list/capacity/1.cc +++ b/libstdc++-v3/testsuite/23_containers/list/capacity/1.cc @@ -21,7 +21,7 @@ #include <list> #include <testsuite_hooks.h> -bool test = true; +bool test __attribute__((unused)) = true; // This test verifies the following. // @@ -60,7 +60,7 @@ test01() } int -main(int argc, char* argv[]) +main() { test01(); return 0; diff --git a/libstdc++-v3/testsuite/23_containers/list/cons/1.cc b/libstdc++-v3/testsuite/23_containers/list/cons/1.cc index dfa8ce2bfa0..1d2f5662f02 100644 --- a/libstdc++-v3/testsuite/23_containers/list/cons/1.cc +++ b/libstdc++-v3/testsuite/23_containers/list/cons/1.cc @@ -21,7 +21,7 @@ #include <list> #include <testsuite_hooks.h> -bool test = true; +bool test __attribute__((unused)) = true; // A nontrivial type. template<typename T> diff --git a/libstdc++-v3/testsuite/23_containers/list/cons/2.cc b/libstdc++-v3/testsuite/23_containers/list/cons/2.cc index 50dc68e38d3..090c7f3d66d 100644 --- a/libstdc++-v3/testsuite/23_containers/list/cons/2.cc +++ b/libstdc++-v3/testsuite/23_containers/list/cons/2.cc @@ -21,7 +21,7 @@ #include <list> #include <testsuite_hooks.h> -bool test = true; +bool test __attribute__((unused)) = true; // A nontrivial type. template<typename T> @@ -48,9 +48,9 @@ struct C { void test02() { - const int LIST_SIZE = 5; + const std::size_t LIST_SIZE = 5; const int INIT_VALUE = 7; - int count; + std::size_t count; std::list<int>::const_iterator i; // nontrivial value_type diff --git a/libstdc++-v3/testsuite/23_containers/list/cons/3.cc b/libstdc++-v3/testsuite/23_containers/list/cons/3.cc index 8baa8627c58..5115dc0abed 100644 --- a/libstdc++-v3/testsuite/23_containers/list/cons/3.cc +++ b/libstdc++-v3/testsuite/23_containers/list/cons/3.cc @@ -21,7 +21,7 @@ #include <list> #include <testsuite_hooks.h> -bool test = true; +bool test __attribute__((unused)) = true; // A nontrivial type. template<typename T> @@ -41,9 +41,9 @@ struct C { void test02D() { - const int LIST_SIZE = 5; + const std::size_t LIST_SIZE = 5; const int INIT_VALUE = 7; - int count = 0; + std::size_t count = 0; std::list<C> list0204(LIST_SIZE, INIT_VALUE); std::list<C>::iterator i = list0204.begin(); for (; i != list0204.end(); ++i, ++count) diff --git a/libstdc++-v3/testsuite/23_containers/list/cons/4.cc b/libstdc++-v3/testsuite/23_containers/list/cons/4.cc index 30395671cbb..68b8d439cf8 100644 --- a/libstdc++-v3/testsuite/23_containers/list/cons/4.cc +++ b/libstdc++-v3/testsuite/23_containers/list/cons/4.cc @@ -21,7 +21,7 @@ #include <list> #include <testsuite_hooks.h> -bool test = true; +bool test __attribute__((unused)) = true; // Range constructor // @@ -35,8 +35,8 @@ void test03() { const int A[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17}; - const int N = sizeof(A) / sizeof(int); - int count; + const std::size_t N = sizeof(A) / sizeof(int); + std::size_t count; std::list<int>::const_iterator i; // construct from a dissimilar range diff --git a/libstdc++-v3/testsuite/23_containers/list/cons/5.cc b/libstdc++-v3/testsuite/23_containers/list/cons/5.cc index 64f17118a47..7bc925a64af 100644 --- a/libstdc++-v3/testsuite/23_containers/list/cons/5.cc +++ b/libstdc++-v3/testsuite/23_containers/list/cons/5.cc @@ -21,7 +21,7 @@ #include <list> #include <testsuite_hooks.h> -bool test = true; +bool test __attribute__((unused)) = true; // Copy constructor // @@ -35,7 +35,7 @@ void test04() { const int A[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17}; - const int N = sizeof(A) / sizeof(int); + const std::size_t N = sizeof(A) / sizeof(int); int count; std::list<int>::reverse_iterator i; std::list<int> list0401(A, A + N); diff --git a/libstdc++-v3/testsuite/23_containers/list/cons/6.cc b/libstdc++-v3/testsuite/23_containers/list/cons/6.cc index 6742c75e1b4..9cdec8b40f7 100644 --- a/libstdc++-v3/testsuite/23_containers/list/cons/6.cc +++ b/libstdc++-v3/testsuite/23_containers/list/cons/6.cc @@ -21,7 +21,7 @@ #include <list> #include <testsuite_hooks.h> -bool test = true; +bool test __attribute__((unused)) = true; // Range assign // @@ -36,9 +36,9 @@ test05() { const int A[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17}; const int B[] = {101, 102, 103, 104, 105}; - const int N = sizeof(A) / sizeof(int); - const int M = sizeof(B) / sizeof(int); - int count; + const std::size_t N = sizeof(A) / sizeof(int); + const std::size_t M = sizeof(B) / sizeof(int); + std::size_t count; std::list<int>::const_iterator i; std::list<int> list0501; diff --git a/libstdc++-v3/testsuite/23_containers/list/cons/7.cc b/libstdc++-v3/testsuite/23_containers/list/cons/7.cc index f600fbbcbdc..650c82b133f 100644 --- a/libstdc++-v3/testsuite/23_containers/list/cons/7.cc +++ b/libstdc++-v3/testsuite/23_containers/list/cons/7.cc @@ -21,7 +21,7 @@ #include <list> #include <testsuite_hooks.h> -bool test = true; +bool test __attribute__((unused)) = true; // Fill assign // @@ -34,11 +34,11 @@ bool test = true; void test06() { - const int BIG_LIST_SIZE = 11; + const std::size_t BIG_LIST_SIZE = 11; const int BIG_INIT_VALUE = 7; - const int SMALL_LIST_SIZE = 5; + const std::size_t SMALL_LIST_SIZE = 5; const int SMALL_INIT_VALUE = 17; - int count; + std::size_t count; std::list<int>::const_iterator i; std::list<int> list0601; diff --git a/libstdc++-v3/testsuite/23_containers/list/cons/8.cc b/libstdc++-v3/testsuite/23_containers/list/cons/8.cc index 17eb0c48ade..66b59a00d03 100644 --- a/libstdc++-v3/testsuite/23_containers/list/cons/8.cc +++ b/libstdc++-v3/testsuite/23_containers/list/cons/8.cc @@ -21,7 +21,7 @@ #include <list> #include <testsuite_hooks.h> -bool test = true; +bool test __attribute__((unused)) = true; // A nontrivial type. @@ -42,9 +42,9 @@ struct C { void test06D() { - const int LIST_SIZE = 5; + const std::size_t LIST_SIZE = 5; const int INIT_VALUE = 7; - int count = 0; + std::size_t count = 0; std::list<C> list0604; VERIFY(list0604.size() == 0); diff --git a/libstdc++-v3/testsuite/23_containers/list/cons/9.cc b/libstdc++-v3/testsuite/23_containers/list/cons/9.cc index 0fa066aabdf..1f26213d8ae 100644 --- a/libstdc++-v3/testsuite/23_containers/list/cons/9.cc +++ b/libstdc++-v3/testsuite/23_containers/list/cons/9.cc @@ -21,7 +21,7 @@ #include <list> #include <testsuite_hooks.h> -bool test = true; +bool test __attribute__((unused)) = true; // Assignment operator // @@ -36,8 +36,8 @@ void test07() { const int A[] = {701, 702, 703, 704, 705}; - const int N = sizeof(A) / sizeof(int); - int count; + const std::size_t N = sizeof(A) / sizeof(int); + std::size_t count; std::list<int>::iterator i; std::list<int> list0701(A, A + N); diff --git a/libstdc++-v3/testsuite/23_containers/list/modifiers/1.cc b/libstdc++-v3/testsuite/23_containers/list/modifiers/1.cc index c5bb6d7dad0..2e75dcabb31 100644 --- a/libstdc++-v3/testsuite/23_containers/list/modifiers/1.cc +++ b/libstdc++-v3/testsuite/23_containers/list/modifiers/1.cc @@ -23,7 +23,7 @@ typedef __gnu_test::copy_tracker T; -bool test = true; +bool test __attribute__((unused)) = true; // range and fill insert/erase + clear // missing: o fill insert disguised as a range insert in all its variants diff --git a/libstdc++-v3/testsuite/23_containers/list/modifiers/2.cc b/libstdc++-v3/testsuite/23_containers/list/modifiers/2.cc index 24eff670750..66c5c12ccc6 100644 --- a/libstdc++-v3/testsuite/23_containers/list/modifiers/2.cc +++ b/libstdc++-v3/testsuite/23_containers/list/modifiers/2.cc @@ -23,7 +23,7 @@ typedef __gnu_test::copy_tracker T; -bool test = true; +bool test __attribute__((unused)) = true; // general single insert/erase + swap void diff --git a/libstdc++-v3/testsuite/23_containers/list/modifiers/3.cc b/libstdc++-v3/testsuite/23_containers/list/modifiers/3.cc index ee4a93c6f0a..dfbc46cb406 100644 --- a/libstdc++-v3/testsuite/23_containers/list/modifiers/3.cc +++ b/libstdc++-v3/testsuite/23_containers/list/modifiers/3.cc @@ -23,7 +23,7 @@ typedef __gnu_test::copy_tracker T; -bool test = true; +bool test __attribute__((unused)) = true; // This test verifies the following. @@ -79,7 +79,7 @@ test01() try { list0101.push_back(T(4, true)); - VERIFY(("no exception thrown", false)); + VERIFY(false); } catch (...) { diff --git a/libstdc++-v3/testsuite/23_containers/list/operators/1.cc b/libstdc++-v3/testsuite/23_containers/list/operators/1.cc index a695b28f8bc..663ff1c81c9 100644 --- a/libstdc++-v3/testsuite/23_containers/list/operators/1.cc +++ b/libstdc++-v3/testsuite/23_containers/list/operators/1.cc @@ -21,7 +21,7 @@ #include <list> #include <testsuite_hooks.h> -bool test = true; +bool test __attribute__((unused)) = true; // splice(p, x) + remove + reverse void @@ -30,8 +30,8 @@ test01() const int K = 417; const int A[] = {1, 2, 3, 4, 5}; const int B[] = {K, K, K, K, K}; - const int N = sizeof(A) / sizeof(int); - const int M = sizeof(B) / sizeof(int); + const std::size_t N = sizeof(A) / sizeof(int); + const std::size_t M = sizeof(B) / sizeof(int); std::list<int> list0101(A, A + N); std::list<int> list0102(B, B + M); @@ -66,7 +66,7 @@ test01() VERIFY(p == list0101.end()); } -main(int argc, char* argv[]) +int main(void) { test01(); return 0; diff --git a/libstdc++-v3/testsuite/23_containers/list/operators/2.cc b/libstdc++-v3/testsuite/23_containers/list/operators/2.cc index 09dc0f1c74f..726c4bfcab4 100644 --- a/libstdc++-v3/testsuite/23_containers/list/operators/2.cc +++ b/libstdc++-v3/testsuite/23_containers/list/operators/2.cc @@ -21,7 +21,7 @@ #include <list> #include <testsuite_hooks.h> -bool test = true; +bool test __attribute__((unused)) = true; // splice(p, x, i) + remove_if + operator== void @@ -52,7 +52,7 @@ test02() VERIFY(list0201 == list0204); } -main(int argc, char* argv[]) +int main() { test02(); return 0; diff --git a/libstdc++-v3/testsuite/23_containers/list/operators/3.cc b/libstdc++-v3/testsuite/23_containers/list/operators/3.cc index c12286c6244..8b9c537a064 100644 --- a/libstdc++-v3/testsuite/23_containers/list/operators/3.cc +++ b/libstdc++-v3/testsuite/23_containers/list/operators/3.cc @@ -21,7 +21,7 @@ #include <list> #include <testsuite_hooks.h> -bool test = true; +bool test __attribute__((unused)) = true; // splice(p, x, f, l) + sort + merge + unique void @@ -66,7 +66,7 @@ test03() VERIFY(list0301 == list0304); } -main(int argc, char* argv[]) +int main(void) { test03(); return 0; diff --git a/libstdc++-v3/testsuite/23_containers/list/operators/4.cc b/libstdc++-v3/testsuite/23_containers/list/operators/4.cc index 6a0b36e3879..5de95b9eb5e 100644 --- a/libstdc++-v3/testsuite/23_containers/list/operators/4.cc +++ b/libstdc++-v3/testsuite/23_containers/list/operators/4.cc @@ -21,7 +21,7 @@ #include <list> #include <testsuite_hooks.h> -bool test = true; +bool test __attribute__((unused)) = true; // A comparison predicate to order by rightmost digit. Tracks call counts for // performance checks. @@ -86,7 +86,7 @@ test04() VERIFY(eq.count() == (N + M - 1)); } -main(int argc, char* argv[]) +int main() { test04(); return 0; diff --git a/libstdc++-v3/testsuite/23_containers/map/insert/1.cc b/libstdc++-v3/testsuite/23_containers/map/insert/1.cc index 67c838f993a..404f3c35cab 100644 --- a/libstdc++-v3/testsuite/23_containers/map/insert/1.cc +++ b/libstdc++-v3/testsuite/23_containers/map/insert/1.cc @@ -29,7 +29,7 @@ // http://gcc.gnu.org/ml/gcc-patches/2001-08/msg01375.html void test01() { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::map<int, int> Map; Map M; Map::iterator hint; diff --git a/libstdc++-v3/testsuite/23_containers/map/operators/1_neg.cc b/libstdc++-v3/testsuite/23_containers/map/operators/1_neg.cc index 75b604c80c2..f105f9b91a5 100644 --- a/libstdc++-v3/testsuite/23_containers/map/operators/1_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/map/operators/1_neg.cc @@ -28,7 +28,7 @@ // libstdc++/86: map & set iterator comparisons are not type-safe void test01() { - bool test = true; + bool test __attribute__((unused)) = true; std::map<unsigned int, int> mapByIndex; std::map<std::string, unsigned> mapByName; diff --git a/libstdc++-v3/testsuite/23_containers/set/operators/1_neg.cc b/libstdc++-v3/testsuite/23_containers/set/operators/1_neg.cc index c3c23741e2e..0c620a18b9d 100644 --- a/libstdc++-v3/testsuite/23_containers/set/operators/1_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/set/operators/1_neg.cc @@ -28,7 +28,7 @@ // libstdc++/86: map & set iterator comparisons are not type-safe int main(void) { - bool test = true; + bool test __attribute__((unused)) = true; std::set<unsigned int> setByIndex; std::set<std::string> setByName; diff --git a/libstdc++-v3/testsuite/23_containers/vector/bool/6886.cc b/libstdc++-v3/testsuite/23_containers/vector/bool/6886.cc index acc6e45f545..f56c21dd544 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/bool/6886.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/bool/6886.cc @@ -26,7 +26,7 @@ // libstdc++/6886 void test02() { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::vector<bool> bvec; int i, num = 0; bvec v; diff --git a/libstdc++-v3/testsuite/23_containers/vector/capacity/1.cc b/libstdc++-v3/testsuite/23_containers/vector/capacity/1.cc index af0eb93c9df..797a2fc0f8a 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/capacity/1.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/capacity/1.cc @@ -34,7 +34,7 @@ struct B { }; void test01() { // non POD types - bool test = true; + bool test __attribute__((unused)) = true; std::vector< A<B> > vec01; typedef std::vector< A<B> >::size_type size_type; diff --git a/libstdc++-v3/testsuite/23_containers/vector/capacity/2.cc b/libstdc++-v3/testsuite/23_containers/vector/capacity/2.cc index 49cfbfa30bd..293ca5945bf 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/capacity/2.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/capacity/2.cc @@ -37,7 +37,7 @@ using __gnu_test::destructor; void test_reserve() { - bool test = true; + bool test __attribute__((unused)) = true; typedef copy_tracker T; typedef std::vector<T, tracker_alloc<T> > X; @@ -67,14 +67,14 @@ test_reserve() void test_reserve_exception_guarantee() { - bool test = true; + bool test __attribute__((unused)) = true; typedef copy_tracker T; typedef std::vector<T, tracker_alloc<T> > X; allocation_tracker::resetCounts(); { X a(7); - const X::size_type old_size = a.size(); + const X::size_type old_size __attribute__((unused)) = a.size(); const X::size_type old_capacity = a.capacity(); const X::size_type new_capacity = old_capacity + 10; T::reset(); @@ -83,7 +83,7 @@ test_reserve_exception_guarantee() try { a.reserve(new_capacity); - VERIFY(("no exception thrown", false)); + VERIFY(false); } catch (...) { diff --git a/libstdc++-v3/testsuite/23_containers/vector/capacity/8230.cc b/libstdc++-v3/testsuite/23_containers/vector/capacity/8230.cc index df7e4b20b44..fe706a4b56a 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/capacity/8230.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/capacity/8230.cc @@ -29,7 +29,7 @@ // libstdc++/8230 void test02() { - bool test = true; + bool test __attribute__((unused)) = true; { std::vector<int> array; const std::size_t size = array.max_size(); diff --git a/libstdc++-v3/testsuite/23_containers/vector/cons/3.cc b/libstdc++-v3/testsuite/23_containers/vector/cons/3.cc index 53afe8f7fdb..5c41e654833 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/cons/3.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/cons/3.cc @@ -29,7 +29,7 @@ void test03() { - bool test = true; + bool test __attribute__((unused)) = true; const int A[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17}; const int B[] = {7, 7, 7, 7, 7}; const int N = sizeof(A) / sizeof(int); diff --git a/libstdc++-v3/testsuite/23_containers/vector/cons/4.cc b/libstdc++-v3/testsuite/23_containers/vector/cons/4.cc index af7556517f6..12564b9ef53 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/cons/4.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/cons/4.cc @@ -40,7 +40,7 @@ void test_default_ctor_exception_gurantee() { // setup - bool test = true; + bool test __attribute__((unused)) = true; typedef copy_tracker T; typedef std::vector<T, tracker_alloc<T> > X; @@ -52,15 +52,14 @@ test_default_ctor_exception_gurantee() try { X a(7); - VERIFY(("no exception thrown", false)); + VERIFY(false); } catch (...) { } // assert postconditions - VERIFY(("memory leak detected:", - allocation_tracker::allocationTotal() == allocation_tracker::deallocationTotal())); + VERIFY( allocation_tracker::allocationTotal() == allocation_tracker::deallocationTotal() ); // teardown } @@ -73,7 +72,7 @@ void test_copy_ctor_exception_gurantee() { // setup - bool test = true; + bool test __attribute__((unused)) = true; typedef copy_tracker T; typedef std::vector<T, tracker_alloc<T> > X; @@ -87,7 +86,7 @@ test_copy_ctor_exception_gurantee() try { X u(a); - VERIFY(("no exception thrown", false)); + VERIFY(false); } catch (...) { @@ -112,7 +111,7 @@ void test_assignment_operator_1() { // setup - bool test = true; + bool test __attribute__((unused)) = true; typedef copy_tracker T; typedef std::vector<T, tracker_alloc<T> > X; @@ -140,7 +139,7 @@ void test_assignment_operator_2() { // setup - bool test = true; + bool test __attribute__((unused)) = true; typedef copy_tracker T; typedef std::vector<T, tracker_alloc<T> > X; @@ -170,7 +169,7 @@ void test_assignment_operator_3() { // setup - bool test = true; + bool test __attribute__((unused)) = true; typedef copy_tracker T; typedef std::vector<T, tracker_alloc<T> > X; @@ -200,7 +199,7 @@ void test_assignment_operator_3_exception_guarantee() { // setup - bool test = true; + bool test __attribute__((unused)) = true; typedef copy_tracker T; typedef std::vector<T, tracker_alloc<T> > X; @@ -218,7 +217,7 @@ test_assignment_operator_3_exception_guarantee() try { r = a; - VERIFY(("no exception thrown", false)); + VERIFY(false); } catch (...) { @@ -245,7 +244,7 @@ void test_fill_assign_1() { // setup - bool test = true; + bool test __attribute__((unused)) = true; typedef copy_tracker T; typedef std::vector<T, tracker_alloc<T> > X; @@ -273,7 +272,7 @@ void test_fill_assign_2() { // setup - bool test = true; + bool test __attribute__((unused)) = true; typedef copy_tracker T; typedef std::vector<T, tracker_alloc<T> > X; @@ -307,14 +306,13 @@ void test_fill_assign_3() { // setup - bool test = true; + bool test __attribute__((unused)) = true; typedef copy_tracker T; typedef std::vector<T, tracker_alloc<T> > X; allocation_tracker::resetCounts(); { X a(7); - X::size_type old_size = a.size(); X::size_type old_capacity = a.capacity(); X::size_type new_size = old_capacity + 4; const T t; @@ -343,7 +341,7 @@ void test_fill_assign_3_exception_guarantee() { // setup - bool test = true; + bool test __attribute__((unused)) = true; typedef copy_tracker T; typedef std::vector<T, tracker_alloc<T> > X; @@ -365,7 +363,7 @@ test_fill_assign_3_exception_guarantee() try { a.assign(new_size, t); - VERIFY(("no exception thrown", false)); + VERIFY(false); } catch (...) { @@ -388,7 +386,7 @@ void test_fill_assign_4() { // setup - bool test = true; + bool test __attribute__((unused)) = true; typedef copy_tracker T; typedef std::vector<T, tracker_alloc<T> > X; @@ -432,13 +430,12 @@ void test_range_assign_2() { // setup - bool test = true; + bool test __attribute__((unused)) = true; typedef copy_tracker T; typedef std::vector<T, tracker_alloc<T> > X; X a(7); X b(3); - X::size_type old_size = a.size(); copy_tracker::reset(); allocation_tracker::resetCounts(); @@ -463,14 +460,13 @@ void test_range_assign_3() { // setup - bool test = true; + bool test __attribute__((unused)) = true; typedef copy_tracker T; typedef std::vector<T, tracker_alloc<T> > X; X a(7); a.reserve(a.size() + 7); X b(a.size() + 3); - X::size_type old_size = a.size(); copy_tracker::reset(); allocation_tracker::resetCounts(); @@ -496,7 +492,7 @@ void test_range_assign_4() { // setup - bool test = true; + bool test __attribute__((unused)) = true; typedef copy_tracker T; typedef std::vector<T, tracker_alloc<T> > X; @@ -504,7 +500,6 @@ test_range_assign_4() { X a(7); X b(a.capacity() + 7); - X::size_type old_size = a.size(); copy_tracker::reset(); @@ -530,7 +525,7 @@ void test_range_assign_4_exception_guarantee() { // setup - bool test = true; + bool test __attribute__((unused)) = true; typedef copy_tracker T; typedef std::vector<T, tracker_alloc<T> > X; @@ -538,7 +533,6 @@ test_range_assign_4_exception_guarantee() { X a(7); X b(a.capacity() + 7); - X::size_type old_size = a.size(); copy_tracker::reset(); copy_constructor::throw_on(3); @@ -550,7 +544,7 @@ test_range_assign_4_exception_guarantee() try { a.assign(b.begin(), b.end()); - VERIFY(("no exception thrown", false)); + VERIFY(false); } catch (...) { diff --git a/libstdc++-v3/testsuite/23_containers/vector/element_access/1.cc b/libstdc++-v3/testsuite/23_containers/vector/element_access/1.cc index 8171715dddb..89026225f9a 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/element_access/1.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/element_access/1.cc @@ -33,7 +33,7 @@ struct B { }; // http://gcc.gnu.org/ml/libstdc++/2000-09/msg00002.html bool test01() { - bool test = true; + bool test __attribute__((unused)) = true; std::vector< A<B> > vec01; std::vector< A<B> > vec02(5); typedef std::vector< A<B> >::size_type size_type; @@ -41,7 +41,7 @@ bool test01() try { - reference r01 = vec01.at(6); + reference r01 __attribute__((unused)) = vec01.at(6); VERIFY( false ); // Should not get here, as exception thrown. } catch(std::out_of_range& err) diff --git a/libstdc++-v3/testsuite/23_containers/vector/modifiers/1.cc b/libstdc++-v3/testsuite/23_containers/vector/modifiers/1.cc index c8321b3bd0f..20fb52d317a 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/modifiers/1.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/modifiers/1.cc @@ -23,7 +23,7 @@ #include <vector> #include "testsuite_hooks.h" -bool test = true; +bool test __attribute__((unused)) = true; template<typename T> struct A { }; diff --git a/libstdc++-v3/testsuite/23_containers/vector/modifiers/2.cc b/libstdc++-v3/testsuite/23_containers/vector/modifiers/2.cc index cc8d36d4108..b6d37396e02 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/modifiers/2.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/modifiers/2.cc @@ -23,7 +23,7 @@ #include <vector> #include "testsuite_hooks.h" -bool test = true; +bool test __attribute__((unused)) = true; // test the assign() function void @@ -32,9 +32,9 @@ test03() const int K = 417; const int A[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17}; const int B[] = {K, K, K, K, K}; - const int N = sizeof(A) / sizeof(int); - const int M = sizeof(B) / sizeof(int); - bool test = true; + const std::size_t N = sizeof(A) / sizeof(int); + const std::size_t M = sizeof(B) / sizeof(int); + bool test __attribute__((unused)) = true; // assign from pointer range std::vector<int> v3; diff --git a/libstdc++-v3/testsuite/23_containers/vector/resize/1.cc b/libstdc++-v3/testsuite/23_containers/vector/resize/1.cc index 3cc6c57ed42..5f8a9de547f 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/resize/1.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/resize/1.cc @@ -32,7 +32,7 @@ void test01() { - bool test = true; + bool test __attribute__((unused)) = true; std::vector<int> v; try { diff --git a/libstdc++-v3/testsuite/24_iterators/back_insert_iterator.cc b/libstdc++-v3/testsuite/24_iterators/back_insert_iterator.cc index 63f64ea08e8..678feb8b245 100644 --- a/libstdc++-v3/testsuite/24_iterators/back_insert_iterator.cc +++ b/libstdc++-v3/testsuite/24_iterators/back_insert_iterator.cc @@ -32,7 +32,7 @@ void test01() typedef back_insert_iterator<list<int> > test_iterator; typedef iterator<output_iterator_tag, void, void, void, void> base_iterator; test_iterator r_it(l); - base_iterator* base = &r_it; + base_iterator* base __attribute__((unused)) = &r_it; // Check for required typedefs typedef test_iterator::value_type value_type; diff --git a/libstdc++-v3/testsuite/24_iterators/front_insert_iterator.cc b/libstdc++-v3/testsuite/24_iterators/front_insert_iterator.cc index cf446f63ddb..32a694e3acf 100644 --- a/libstdc++-v3/testsuite/24_iterators/front_insert_iterator.cc +++ b/libstdc++-v3/testsuite/24_iterators/front_insert_iterator.cc @@ -32,7 +32,7 @@ void test01() typedef front_insert_iterator<list<int> > test_iterator; typedef iterator<output_iterator_tag, void, void, void, void> base_iterator; test_iterator r_it(l); - base_iterator* base = &r_it; + base_iterator* base __attribute__((unused)) = &r_it; // Check for required typedefs typedef test_iterator::value_type value_type; diff --git a/libstdc++-v3/testsuite/24_iterators/insert_iterator.cc b/libstdc++-v3/testsuite/24_iterators/insert_iterator.cc index 0cb2d8782a7..7fca06092d8 100644 --- a/libstdc++-v3/testsuite/24_iterators/insert_iterator.cc +++ b/libstdc++-v3/testsuite/24_iterators/insert_iterator.cc @@ -34,7 +34,7 @@ void test01() typedef insert_iterator<list<int> > test_iterator; typedef iterator<output_iterator_tag, void, void, void, void> base_iterator; test_iterator r_it(l, li); - base_iterator* base = &r_it; + base_iterator* base __attribute__((unused)) = &r_it; // Check for required typedefs typedef test_iterator::value_type value_type; diff --git a/libstdc++-v3/testsuite/24_iterators/istream_iterator.cc b/libstdc++-v3/testsuite/24_iterators/istream_iterator.cc index d278e1994b4..3f097d512bf 100644 --- a/libstdc++-v3/testsuite/24_iterators/istream_iterator.cc +++ b/libstdc++-v3/testsuite/24_iterators/istream_iterator.cc @@ -33,7 +33,7 @@ void test01() typedef iterator<input_iterator_tag, long, ptrdiff_t, const long*, const long&> base_iterator; test_iterator r_it; - base_iterator* base = &r_it; + base_iterator* base __attribute__((unused)) = &r_it; // Check for required typedefs typedef test_iterator::value_type value_type; @@ -53,7 +53,7 @@ template class std::istream_iterator<char>; void test02() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; string st("R.Rorty"); diff --git a/libstdc++-v3/testsuite/24_iterators/istreambuf_iterator.cc b/libstdc++-v3/testsuite/24_iterators/istreambuf_iterator.cc index 2f97f8973cf..8683de6e463 100644 --- a/libstdc++-v3/testsuite/24_iterators/istreambuf_iterator.cc +++ b/libstdc++-v3/testsuite/24_iterators/istreambuf_iterator.cc @@ -35,7 +35,7 @@ void test01() istringstream isstream("this tag"); test_iterator r_it(isstream); - base_iterator* base = &r_it; + base_iterator* base __attribute__((unused)) = &r_it; // Check for required typedefs typedef test_iterator::value_type value_type; @@ -55,7 +55,7 @@ bool test02(void) typedef std::istreambuf_iterator<char> cistreambuf_iter; typedef cistreambuf_iter::streambuf_type cstreambuf_type; - bool test = true; + bool test __attribute__((unused)) = true; const char slit01[] = "playa hermosa, liberia, guanacaste"; std::string str01(slit01); std::istringstream istrs00(str01); @@ -120,7 +120,7 @@ bool test02(void) // istreambuf_iterator& operator++(int); cistreambuf_iter istrb_it27(istrs01.rdbuf()); char c; - for (int i = 0; i < sizeof(slit01) - 2; ++i) + for (std::size_t i = 0; i < sizeof(slit01) - 2; ++i) { c = *istrb_it27++; VERIFY( c == slit01[i] ); @@ -128,7 +128,7 @@ bool test02(void) std::istringstream istrs02(str01); cistreambuf_iter istrb_it28(istrs02); - for (int i = 0; i < sizeof(slit01) - 2;) + for (std::size_t i = 0; i < sizeof(slit01) - 2;) { c = *++istrb_it28; VERIFY( c == slit01[++i] ); @@ -139,28 +139,28 @@ bool test02(void) // libstdc++/2627 void test03() { - bool test = true; + bool test __attribute__((unused)) = true; const std::string s("free the vieques"); // 1 std::string res_postfix; std::istringstream iss01(s); std::istreambuf_iterator<char> isbufit01(iss01); - for (int j = 0; j < s.size(); ++j, isbufit01++) + for (std::size_t j = 0; j < s.size(); ++j, isbufit01++) res_postfix += *isbufit01; // 2 std::string res_prefix; std::istringstream iss02(s); std::istreambuf_iterator<char> isbufit02(iss02); - for (int j = 0; j < s.size(); ++j, ++isbufit02) + for (std::size_t j = 0; j < s.size(); ++j, ++isbufit02) res_prefix += *isbufit02; // 3 mixed std::string res_mixed; std::istringstream iss03(s); std::istreambuf_iterator<char> isbufit03(iss03); - for (int j = 0; j < int(s.size() / 2); ++j) + for (std::size_t j = 0; j < (s.size() / 2); ++j) { res_mixed += *isbufit03; ++isbufit03; diff --git a/libstdc++-v3/testsuite/24_iterators/iterator.cc b/libstdc++-v3/testsuite/24_iterators/iterator.cc index db8b63369a5..51360b09cdb 100644 --- a/libstdc++-v3/testsuite/24_iterators/iterator.cc +++ b/libstdc++-v3/testsuite/24_iterators/iterator.cc @@ -589,7 +589,7 @@ test6642() } int -main(int argc, char **argv) +main() { int failures(0); diff --git a/libstdc++-v3/testsuite/24_iterators/ostream_iterator.cc b/libstdc++-v3/testsuite/24_iterators/ostream_iterator.cc index 53fee23e1a1..54668572503 100644 --- a/libstdc++-v3/testsuite/24_iterators/ostream_iterator.cc +++ b/libstdc++-v3/testsuite/24_iterators/ostream_iterator.cc @@ -33,7 +33,7 @@ void test01() typedef iterator<output_iterator_tag, void, void, void, void> base_iterator; ostringstream osstream("this tag"); test_iterator r_it(osstream); - base_iterator* base = &r_it; + base_iterator* base __attribute__((unused)) = &r_it; // Check for required typedefs typedef test_iterator::value_type value_type; diff --git a/libstdc++-v3/testsuite/24_iterators/ostreambuf_iterator.cc b/libstdc++-v3/testsuite/24_iterators/ostreambuf_iterator.cc index 6fbfe6d5144..3bc6bbbcf98 100644 --- a/libstdc++-v3/testsuite/24_iterators/ostreambuf_iterator.cc +++ b/libstdc++-v3/testsuite/24_iterators/ostreambuf_iterator.cc @@ -33,7 +33,7 @@ void test01() typedef iterator<output_iterator_tag, void, void, void, void> base_iterator; ostringstream osstream("this tag"); test_iterator r_it(osstream); - base_iterator* base = &r_it; + base_iterator* base __attribute__((unused)) = &r_it; // Check for required typedefs typedef test_iterator::value_type value_type; @@ -52,7 +52,7 @@ bool test02(void) { typedef std::ostreambuf_iterator<char> costreambuf_iter; typedef costreambuf_iter::streambuf_type cstreambuf_type; - bool test = true; + bool test __attribute__((unused)) = true; const char slit01[] = "playa hermosa, liberia, guanacaste"; const char slit02[] = "bodega bay, lost coast, california"; std::string str01(slit01); diff --git a/libstdc++-v3/testsuite/24_iterators/reverse_iterator/1.cc b/libstdc++-v3/testsuite/24_iterators/reverse_iterator/1.cc index 1278a21e8bb..2852d87bb68 100644 --- a/libstdc++-v3/testsuite/24_iterators/reverse_iterator/1.cc +++ b/libstdc++-v3/testsuite/24_iterators/reverse_iterator/1.cc @@ -36,7 +36,7 @@ void test01() iterator_traits<long*>::reference> base_iterator; test_iterator r_it(&l); - base_iterator* base = &r_it; + base_iterator* base __attribute__((unused)) = &r_it; // Check for required typedefs typedef test_iterator::value_type value_type; diff --git a/libstdc++-v3/testsuite/24_iterators/reverse_iterator/3.cc b/libstdc++-v3/testsuite/24_iterators/reverse_iterator/3.cc index ffb6e779db0..138d41cd5bc 100644 --- a/libstdc++-v3/testsuite/24_iterators/reverse_iterator/3.cc +++ b/libstdc++-v3/testsuite/24_iterators/reverse_iterator/3.cc @@ -27,7 +27,7 @@ // libstdc++/10783 void test03() { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::vector<int> V; VERIFY( sizeof(V::iterator) == sizeof(V::reverse_iterator) ); diff --git a/libstdc++-v3/testsuite/25_algorithms/binary_search.cc b/libstdc++-v3/testsuite/25_algorithms/binary_search.cc index fda74d2a706..37019f84ede 100644 --- a/libstdc++-v3/testsuite/25_algorithms/binary_search.cc +++ b/libstdc++-v3/testsuite/25_algorithms/binary_search.cc @@ -21,7 +21,7 @@ #include <algorithm> #include <testsuite_hooks.h> -bool test = true; +bool test __attribute__((unused)) = true; const int A[] = {1, 2, 3, 3, 3, 5, 8}; const int C[] = {8, 5, 3, 3, 3, 2, 1}; @@ -172,12 +172,12 @@ test04() } int -main(int argc, char* argv[]) +main() { - test01(); - test02(); - test03(); - test04(); - - return !test; + test01(); + test02(); + test03(); + test04(); + + return 0; } diff --git a/libstdc++-v3/testsuite/25_algorithms/copy.cc b/libstdc++-v3/testsuite/25_algorithms/copy.cc index d8fbb9d2b00..6e699113b58 100644 --- a/libstdc++-v3/testsuite/25_algorithms/copy.cc +++ b/libstdc++-v3/testsuite/25_algorithms/copy.cc @@ -21,7 +21,7 @@ #include <algorithm> #include <testsuite_hooks.h> -bool test = true; +bool test __attribute__((unused)) = true; const int A[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17}; const int N = sizeof(A) / sizeof(int); @@ -49,10 +49,10 @@ test02() } int -main(int argc, char* argv[]) +main() { - test01(); - test02(); + test01(); + test02(); - return !test; + return 0; } diff --git a/libstdc++-v3/testsuite/25_algorithms/heap.cc b/libstdc++-v3/testsuite/25_algorithms/heap.cc index e78fae8477d..a62a9a819b6 100644 --- a/libstdc++-v3/testsuite/25_algorithms/heap.cc +++ b/libstdc++-v3/testsuite/25_algorithms/heap.cc @@ -22,7 +22,7 @@ //#include <cmath> #include <testsuite_hooks.h> -bool test = true; +bool test __attribute__((unused)) = true; const int A[] = {1, 11, 12, 3, 10, 6, 17, 4, 8, 2, 5, 13, 9, 15, 14, 16, 7}; const int B[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17}; @@ -123,10 +123,10 @@ test02() } int -main(int argc, char* argv[]) +main() { - test01(); - test02(); + test01(); + test02(); - return !test; + return 0; } diff --git a/libstdc++-v3/testsuite/25_algorithms/lower_bound.cc b/libstdc++-v3/testsuite/25_algorithms/lower_bound.cc index a3a23050165..6afb28fffbc 100644 --- a/libstdc++-v3/testsuite/25_algorithms/lower_bound.cc +++ b/libstdc++-v3/testsuite/25_algorithms/lower_bound.cc @@ -28,5 +28,5 @@ bool operator< (const foo&, const foo&) { return true; }; void bar(foo* a, foo* b, foo& x) { - foo* c = std::lower_bound(a, b, x); + foo* c __attribute__((unused)) = std::lower_bound(a, b, x); } diff --git a/libstdc++-v3/testsuite/25_algorithms/min_max.cc b/libstdc++-v3/testsuite/25_algorithms/min_max.cc index ef8acfd249f..bd07009c015 100644 --- a/libstdc++-v3/testsuite/25_algorithms/min_max.cc +++ b/libstdc++-v3/testsuite/25_algorithms/min_max.cc @@ -24,7 +24,7 @@ void test01() { - bool test = true; + bool test __attribute__((unused)) = true; const int& x = std::max(1, 2); const int& y = std::max(4, 3); @@ -74,7 +74,7 @@ template int A<long double>::a; void test02() { - bool test = true; + bool test __attribute__((unused)) = true; VERIFY( 2 == std::min(A<int>::a, 2) ); VERIFY( 3 == std::min(A<int>::a, 4) ); diff --git a/libstdc++-v3/testsuite/25_algorithms/partition.cc b/libstdc++-v3/testsuite/25_algorithms/partition.cc index 3424dcf80fd..b05c203bd32 100644 --- a/libstdc++-v3/testsuite/25_algorithms/partition.cc +++ b/libstdc++-v3/testsuite/25_algorithms/partition.cc @@ -22,7 +22,7 @@ #include <functional> #include <testsuite_hooks.h> -bool test = true; +bool test __attribute__((unused)) = true; const int A[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17}; const int B[] = {2, 4, 6, 8, 10, 12, 14, 16, 1, 3, 5, 7, 9, 11, 13, 15, 17}; @@ -64,10 +64,10 @@ test02() } int -main(int argc, char* argv[]) +main() { - test01(); - test02(); + test01(); + test02(); - return !test; + return 0; } diff --git a/libstdc++-v3/testsuite/25_algorithms/rotate.cc b/libstdc++-v3/testsuite/25_algorithms/rotate.cc index 5102a649fdc..2c0487706ea 100644 --- a/libstdc++-v3/testsuite/25_algorithms/rotate.cc +++ b/libstdc++-v3/testsuite/25_algorithms/rotate.cc @@ -22,7 +22,7 @@ #include <testsuite_hooks.h> #include <list> -bool test = true; +bool test __attribute__((unused)) = true; int A[] = {1, 2, 3, 4, 5, 6, 7}; int B[] = {2, 3, 4, 5, 6, 7, 1}; @@ -72,9 +72,9 @@ test03() } int -main(int argc, char* argv[]) +main() { - test02(); - test03(); - return !test; + test02(); + test03(); + return 0; } diff --git a/libstdc++-v3/testsuite/25_algorithms/sort.cc b/libstdc++-v3/testsuite/25_algorithms/sort.cc index 2fcc6384ccf..f1fa87cd42b 100644 --- a/libstdc++-v3/testsuite/25_algorithms/sort.cc +++ b/libstdc++-v3/testsuite/25_algorithms/sort.cc @@ -21,7 +21,7 @@ #include <algorithm> #include <testsuite_hooks.h> -bool test = true; +bool test __attribute__((unused)) = true; const int A[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20}; const int B[] = {10, 20, 1, 11, 2, 12, 3, 13, 4, 14, 5, 15, 6, 16, 7, 17, 8, 18, 9, 19}; @@ -159,13 +159,13 @@ test05() } int -main(int argc, char* argv[]) +main() { - test01(); - test02(); - test03(); - test04(); - test05(); - - return !test; + test01(); + test02(); + test03(); + test04(); + test05(); + + return 0; } diff --git a/libstdc++-v3/testsuite/26_numerics/c99_classification_macros_c++.cc b/libstdc++-v3/testsuite/26_numerics/c99_classification_macros_c++.cc index 095a7bc990e..543f3d43fc9 100644 --- a/libstdc++-v3/testsuite/26_numerics/c99_classification_macros_c++.cc +++ b/libstdc++-v3/testsuite/26_numerics/c99_classification_macros_c++.cc @@ -59,7 +59,7 @@ void isunordered() { } template <typename _Tp> void test_c99_classify() { - bool test = true; + bool test __attribute__((unused)) = true; typedef _Tp fp_type; fp_type f1 = 1.0; diff --git a/libstdc++-v3/testsuite/26_numerics/c_math.cc b/libstdc++-v3/testsuite/26_numerics/c_math.cc index f01e4868b44..60cb5d05a01 100644 --- a/libstdc++-v3/testsuite/26_numerics/c_math.cc +++ b/libstdc++-v3/testsuite/26_numerics/c_math.cc @@ -44,7 +44,7 @@ test02() int test03() { - double powtest = std::pow(2., 0); + double powtest __attribute__((unused)) = std::pow(2., 0); return 0; } @@ -52,7 +52,7 @@ test03() int test04() { - bool test = true; + bool test __attribute__((unused)) = true; float x[2] = {1, 2}; float y = 3.4; std::modf(y, &x[0]); diff --git a/libstdc++-v3/testsuite/26_numerics/c_math_dynamic.cc b/libstdc++-v3/testsuite/26_numerics/c_math_dynamic.cc index 25efa10a192..86a6f930f72 100644 --- a/libstdc++-v3/testsuite/26_numerics/c_math_dynamic.cc +++ b/libstdc++-v3/testsuite/26_numerics/c_math_dynamic.cc @@ -45,7 +45,7 @@ int test02 () { float a = 0.0f; - float b = std::acos(b); + float b __attribute__((unused)) = std::acos(a); return 0; } diff --git a/libstdc++-v3/testsuite/26_numerics/complex_inserters_extractors.cc b/libstdc++-v3/testsuite/26_numerics/complex_inserters_extractors.cc index f285fb70fec..b7059f7e864 100644 --- a/libstdc++-v3/testsuite/26_numerics/complex_inserters_extractors.cc +++ b/libstdc++-v3/testsuite/26_numerics/complex_inserters_extractors.cc @@ -38,7 +38,7 @@ template<typename R> int test_good(std::string str, R x, R y) { - bool test = true; + bool test __attribute__((unused)) = true; std::complex<R> z; char ch; std::istringstream iss(str); @@ -54,7 +54,7 @@ template<typename R> int test_fail(std::string str) { - bool test = true; + bool test __attribute__((unused)) = true; std::complex<R> z; std::istringstream iss(str); iss >> z; @@ -87,7 +87,7 @@ testall() void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; complex<float> cf01(-1.1, -333.2); stringstream ss; @@ -105,7 +105,7 @@ template class std::basic_string<char, gnu_char_traits, std::allocator<char> >; void test02() { - bool test = true; + bool test __attribute__((unused)) = true; // Construct locale with specialized facets. typedef gnu_sstream::__num_put_type numput_type; @@ -117,7 +117,6 @@ void test02() VERIFY( std::has_facet<numget_type>(loc_2) ); gnu_sstream sstr; - std::basic_ios<char, gnu_char_traits>* pios = &sstr; sstr.imbue(loc_2); diff --git a/libstdc++-v3/testsuite/26_numerics/complex_value.cc b/libstdc++-v3/testsuite/26_numerics/complex_value.cc index ebdd71a2c71..62720c621f3 100644 --- a/libstdc++-v3/testsuite/26_numerics/complex_value.cc +++ b/libstdc++-v3/testsuite/26_numerics/complex_value.cc @@ -26,7 +26,7 @@ void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; typedef complex<double> complex_type; const double cd1 = -11.451; const double cd2 = -442.1533; diff --git a/libstdc++-v3/testsuite/26_numerics/slice.cc b/libstdc++-v3/testsuite/26_numerics/slice.cc index a02c1f5801b..a7278edfc90 100644 --- a/libstdc++-v3/testsuite/26_numerics/slice.cc +++ b/libstdc++-v3/testsuite/26_numerics/slice.cc @@ -25,14 +25,14 @@ #include <testsuite_hooks.h> bool -construction(int start, int size, int stride) +construction(std::size_t start, std::size_t size, std::size_t stride) { std::slice s(start, size, stride); return s.start() == start && s.size() == size && s.stride() == stride; } bool -copy(int start, int size, int stride) +copy(std::size_t start, std::size_t size, std::size_t stride) { std::slice s(start, size, stride); std::slice t = s; @@ -40,7 +40,7 @@ copy(int start, int size, int stride) } bool -assignment(int start, int size, int stride) +assignment(std::size_t start, std::size_t size, std::size_t stride) { std::slice s(start, size, stride); std::slice t; @@ -51,8 +51,9 @@ assignment(int start, int size, int stride) int main() { - bool test = true; - std::srand(20020717); using std::rand; + bool test __attribute__((unused)) = true; + std::srand(20020717); + using std::rand; VERIFY(construction(rand(), rand(), rand())); VERIFY(copy(rand(), rand(), rand())); diff --git a/libstdc++-v3/testsuite/26_numerics/slice_array_assignment.cc b/libstdc++-v3/testsuite/26_numerics/slice_array_assignment.cc index a637b872b2e..2d5af920735 100644 --- a/libstdc++-v3/testsuite/26_numerics/slice_array_assignment.cc +++ b/libstdc++-v3/testsuite/26_numerics/slice_array_assignment.cc @@ -34,7 +34,7 @@ int main() { - bool test = true; + bool test __attribute__((unused)) = true; using std::valarray; using std::slice; valarray<int> v(1, 10), w(2, 10); diff --git a/libstdc++-v3/testsuite/26_numerics/sum_diff.cc b/libstdc++-v3/testsuite/26_numerics/sum_diff.cc index ffc4e639c1c..9a4cf68c1d5 100644 --- a/libstdc++-v3/testsuite/26_numerics/sum_diff.cc +++ b/libstdc++-v3/testsuite/26_numerics/sum_diff.cc @@ -40,7 +40,7 @@ test01() } int -main(int argc, char* argv[]) +main() { test01(); return 0; diff --git a/libstdc++-v3/testsuite/26_numerics/valarray.cc b/libstdc++-v3/testsuite/26_numerics/valarray.cc index f2348f018ab..37c9e0286e4 100644 --- a/libstdc++-v3/testsuite/26_numerics/valarray.cc +++ b/libstdc++-v3/testsuite/26_numerics/valarray.cc @@ -37,7 +37,7 @@ int main() // 02: algo using std::valarray; valarray<double> b, c; - double m = std::abs(b - c).max(); + double m __attribute__((unused)) = std::abs(b - c).max(); return 0; } diff --git a/libstdc++-v3/testsuite/26_numerics/valarray_operators.cc b/libstdc++-v3/testsuite/26_numerics/valarray_operators.cc index 84c072a4895..16479a51241 100644 --- a/libstdc++-v3/testsuite/26_numerics/valarray_operators.cc +++ b/libstdc++-v3/testsuite/26_numerics/valarray_operators.cc @@ -24,7 +24,7 @@ void test01() // check unary operators { - bool test = true; + bool test __attribute__((unused)) = true; std::valarray<int> u(1); u[0]=1; @@ -36,7 +36,7 @@ void test01() // check unary operators void test02() // check binary operators { - bool test = true; + bool test __attribute__((unused)) = true; std::valarray<int> u(1), v(1); u[0]=1; v[0]=3; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/3.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/3.cc index 54cfba150bd..6cb9e6e8b3f 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/3.cc @@ -115,7 +115,7 @@ struct gnu_char_traits void test07() { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::basic_filebuf<gnu_char_type, gnu_char_traits> gnu_filebuf; try diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/4.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/4.cc index 9516cb2eccb..e330430973c 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/4.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/4.cc @@ -28,7 +28,7 @@ void test01() typedef std::filebuf test_type; typedef std::streambuf base_type; const test_type& obj = test_type(); - const base_type* base = &obj; + const base_type* base __attribute__((unused)) = &obj; } int main() diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/1.cc index 5b2f484a0f9..5d87cabc1ea 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/1.cc @@ -32,7 +32,7 @@ const char name_02[] = "filebuf_members-1.txt"; // Test member functions. void test_01() { - bool test = true; + bool test __attribute__((unused)) = true; const char* name_03 = "filebuf_members-3"; // empty file, need to create std::filebuf fb_01; // in diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/2.cc index b0ebd5817c6..0657ed8218c 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/2.cc @@ -42,7 +42,7 @@ const char name_02[] = "filebuf_virtuals-2.txt"; // empty file, need to create void test_02() { - bool test = true; + bool test __attribute__((unused)) = true; int close_num; // read (ext) diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/3.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/3.cc index 3f6dfd56b3a..6fc4bc50208 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/3.cc @@ -65,11 +65,8 @@ void test05() typedef std::filebuf::off_type off_type; typedef size_t size_type; - bool test = true; + bool test __attribute__((unused)) = true; std::filebuf f_tmp; - std::streamsize strmsz_1, strmsz_2; - std::streamoff strmof_1, strmof_2; - int i = 0, j = 0, k = 0; fb_01.open(name_01, std::ios_base::in); fb_02.open(name_02, std::ios_base::out | std::ios_base::trunc); @@ -85,7 +82,7 @@ void test05() VERIFY( !fb_03.is_open() ); } -main() +int main() { test03(); test05(); diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/4.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/4.cc index 2992a4225f1..6222874f9cf 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/4.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/4.cc @@ -34,7 +34,7 @@ void test_04() { typedef std::filebuf::traits_type traits_type; - bool test = true; + bool test __attribute__((unused)) = true; std::filebuf fb_01, fb_02; char buffer[] = "xxxxxxxxxx"; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/4879.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/4879.cc index cd95bc653b4..90107cd72a9 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/4879.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/4879.cc @@ -40,7 +40,7 @@ void test_04() { - bool test = true; + bool test __attribute__((unused)) = true; const char* name = "tmp_fifo1"; signal(SIGPIPE, SIG_IGN); diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/5.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/5.cc index 02496d6a0e9..cfac4a7a384 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/5.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/5.cc @@ -58,7 +58,7 @@ public: void test_05() { - bool test = true; + bool test __attribute__((unused)) = true; Close_filebuf fb_01, fb_02; char buffer[] = "xxxxxxxxxx"; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/9964.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/9964.cc index c61530b1dff..895c0956e23 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/9964.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/9964.cc @@ -38,7 +38,7 @@ void test_07() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; const char* name = "tmp_fifo3"; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/cons/wchar_t/10132-1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/cons/wchar_t/10132-1.cc index c25e0021532..04f4b44358e 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/cons/wchar_t/10132-1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/cons/wchar_t/10132-1.cc @@ -34,7 +34,7 @@ protected: int main() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; locale loc = locale(locale::classic(), new Cvt); wfilebuf* fb = new wfilebuf; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/2.cc index 434f1e2312d..f10ff4f8c40 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/2.cc @@ -27,7 +27,7 @@ void test02() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; const char name_01[] = "filebuf_virtuals-1.txt"; // file with data in it locale loc; @@ -47,7 +47,7 @@ void test02() VERIFY( ob.getloc() == loc ); } -main() +int main() { test02(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/3.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/3.cc index 1899278d415..0cd5d0f27fd 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/3.cc @@ -35,7 +35,7 @@ protected: void test03() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; locale loc_s(locale::classic(), new state_codecvt); filebuf ob; @@ -48,7 +48,7 @@ void test03() VERIFY( ob.getloc() == loc_s ); } -main() +int main() { test03(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/9322.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/9322.cc index efe8cbbeea0..6cddf0190d0 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/9322.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/9322.cc @@ -28,7 +28,7 @@ void test07() { using std::locale; - bool test = true; + bool test __attribute__((unused)) = true; locale loc; std::filebuf ob; @@ -46,7 +46,7 @@ void test07() VERIFY( ob.getloc() == loc_de ); } -main() +int main() { test07(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/2.cc index 7fe0d4cc65b..c47a6faac51 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/2.cc @@ -27,7 +27,7 @@ void test02() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; const char name_01[] = "filebuf_virtuals-1.txt"; // file with data in it locale loc; @@ -47,7 +47,7 @@ void test02() VERIFY( ob.getloc() == loc ); } -main() +int main() { test02(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/3.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/3.cc index 393732bee36..067e48784b2 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/3.cc @@ -35,7 +35,7 @@ protected: void test03() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; locale loc_s(locale::classic(), new state_codecvt); wfilebuf ob; @@ -48,7 +48,7 @@ void test03() VERIFY( ob.getloc() == loc_s ); } -main() +int main() { test03(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/9322.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/9322.cc index 8a76a997c9a..9cf3d5bd4d3 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/9322.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/9322.cc @@ -28,7 +28,7 @@ void test07() { using std::locale; - bool test = true; + bool test __attribute__((unused)) = true; locale loc; std::wfilebuf ob; @@ -46,7 +46,7 @@ void test07() VERIFY( ob.getloc() == loc_de ); } -main() +int main() { test07(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/in_avail/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/in_avail/char/1.cc index d8ec0a3546e..6f6879b127c 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/in_avail/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/in_avail/char/1.cc @@ -65,11 +65,9 @@ void test05() typedef std::filebuf::off_type off_type; typedef size_t size_type; - bool test = true; + bool test __attribute__((unused)) = true; std::filebuf f_tmp; - std::streamsize strmsz_1, strmsz_2; std::streamoff strmof_1, strmof_2; - int i = 0, j = 0, k = 0; // GET // int in_avail() @@ -93,7 +91,7 @@ void test05() VERIFY( strmof_1 == 0 ); // empty file } -main() +int main() { test03(); test05(); diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/is_open/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/is_open/char/1.cc index 4b4c022a1c2..b4569bbb22d 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/is_open/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/is_open/char/1.cc @@ -32,7 +32,7 @@ const char name_02[] = "filebuf_members-1.txt"; // Test member functions. void test_01() { - bool test = true; + bool test __attribute__((unused)) = true; const char* name_03 = "filebuf_members-3"; // empty file, need to create std::filebuf fb_01; // in diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/1.cc index 424d4b63eb5..dffdc748dbc 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/1.cc @@ -32,7 +32,7 @@ const char name_02[] = "filebuf_members-1.txt"; // Test member functions. void test_01() { - bool test = true; + bool test __attribute__((unused)) = true; const char* name_03 = "filebuf_members-3"; // empty file, need to create std::filebuf fb_01; // in diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/2.cc index cf0ffa94c87..b50208db363 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/2.cc @@ -36,7 +36,7 @@ const char name_01[] = "filebuf_virtuals-1.txt"; // file with data in it void test_03() { - bool test = true; + bool test __attribute__((unused)) = true; int first_fd = ::open(name_01, O_RDONLY); VERIFY( first_fd != -1 ); FILE* first_file = ::fdopen(first_fd, "r"); diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/3.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/3.cc index c08817f7eab..db8f2d7bc57 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/3.cc @@ -29,7 +29,7 @@ // Charles Leggett <CGLeggett@lbl.gov> void test_05() { - bool test = true; + bool test __attribute__((unused)) = true; const char* name = "tmp_file5"; std::fstream scratch_file; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/9507.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/9507.cc index 99c70a9cd1e..85eeededdd2 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/9507.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/9507.cc @@ -37,7 +37,7 @@ // libstdc++/9507 void test_06() { - bool test = true; + bool test __attribute__((unused)) = true; const char* name = "tmp_fifo2"; signal(SIGPIPE, SIG_IGN); diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/1.cc index fd960e45511..d66fb1442a8 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/1.cc @@ -58,7 +58,7 @@ template<typename T> void test03() { - bool test = true; + bool test __attribute__((unused)) = true; const std::string control01("11111"); std::string test01; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/2-unbuf.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/2-unbuf.cc index 9c5da4485cf..661bd1d3084 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/2-unbuf.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/2-unbuf.cc @@ -36,7 +36,7 @@ public: void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; typedef OverBuf::traits_type traits_type; OverBuf fb; @@ -47,7 +47,7 @@ void test01() fb.close(); } -main() +int main() { test01(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/2.cc index 4984602703a..f9c69f84e86 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/2.cc @@ -36,7 +36,7 @@ public: void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; typedef OverBuf::traits_type traits_type; OverBuf fb; @@ -46,7 +46,7 @@ void test01() fb.close(); } -main() +int main() { test01(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/3599.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/3599.cc index 795c58ccf3e..6684d5dea5b 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/3599.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/3599.cc @@ -41,14 +41,14 @@ public: protected: int_type - overflow(int_type c = traits_type::eof()) + overflow(int_type c __attribute__((unused)) = traits_type::eof()) { return traits_type::not_eof(0); } }; void test07() { - bool test = true; + bool test __attribute__((unused)) = true; testbuf ob; std::ostream out(&ob); diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/9169.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/9169.cc index 18ed29d328c..dc163bae1a0 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/9169.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/9169.cc @@ -39,7 +39,7 @@ class Cvt_to_upper : public std::codecvt<char, char, mbstate_t> void test10() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; locale c_loc = locale::classic(); locale loc(c_loc, new Cvt_to_upper); @@ -65,7 +65,7 @@ void test10() VERIFY( tmp == str ); } -main() +int main() { test10(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/9182-2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/9182-2.cc index b752bce8a49..9904f194109 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/9182-2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/9182-2.cc @@ -51,7 +51,7 @@ protected: void test14() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; locale loc = locale::classic(); loc = locale(loc, new errorcvt); @@ -65,7 +65,7 @@ void test14() fbuf1.close(); } -main() +int main() { test14(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/9988.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/9988.cc index 2c8d078f0e4..8133045afe5 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/9988.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/9988.cc @@ -37,7 +37,7 @@ public: void test15() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; OverBuf fb; fb.open(name_08, ios_base::out | ios_base::trunc); @@ -62,7 +62,7 @@ void test15() fbin.close(); } -main() +int main() { test15(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-1.cc index fc96a047fdf..70788e31aaa 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-1.cc @@ -25,7 +25,7 @@ void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; wfilebuf fb; locale loc(__gnu_test::try_named_locale("en_US.UTF-8")); diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-2.cc index 2415a2edcfb..0e6297a0add 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-2.cc @@ -25,7 +25,7 @@ void test02() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; wfilebuf fb; locale loc(__gnu_test::try_named_locale("en_US.UTF-8")); diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-3.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-3.cc index fc0092df09c..9558393d484 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-3.cc @@ -25,7 +25,7 @@ void test03() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; wfilebuf fb; locale loc(__gnu_test::try_named_locale("en_US.UTF-8")); diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-4.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-4.cc index 1886f8e630f..7e6010d5737 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-4.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-4.cc @@ -25,7 +25,7 @@ void test04() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; wfilebuf fb; locale loc(__gnu_test::try_named_locale("en_US.UTF-8")); diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/pbackfail/char/9761.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/pbackfail/char/9761.cc index 07e1ddad810..6bf97519301 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/pbackfail/char/9761.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/pbackfail/char/9761.cc @@ -29,7 +29,7 @@ const char name_01[] = "filebuf_virtuals-1.txt"; // file with data in it void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; filebuf fbuf; filebuf::int_type r1, r2; @@ -48,7 +48,7 @@ void test01() VERIFY( r2 == filebuf::traits_type::eof() ); } -main() +int main() { test01(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-in.cc index f1b30d8de1a..14cc40f0152 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-in.cc @@ -36,7 +36,7 @@ void test05() typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; - bool test = true; + bool test __attribute__((unused)) = true; // int_type sbumpc() // if read_cur not avail returns uflow(), else return *read_cur & increment @@ -72,7 +72,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-io.cc index f649ef87dc6..7236e939a35 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-io.cc @@ -37,7 +37,7 @@ void test05() typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; - bool test = true; + bool test __attribute__((unused)) = true; // int_type sbumpc() // if read_cur not avail returns uflow(), else return *read_cur & increment @@ -85,7 +85,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-out.cc index 1a43f327dca..107af85e16f 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-out.cc @@ -36,7 +36,7 @@ void test05() typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; - bool test = true; + bool test __attribute__((unused)) = true; // int_type sbumpc() // if read_cur not avail returns uflow(), else return *read_cur & increment @@ -56,7 +56,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-in.cc index e06e0625efb..f57578d29f9 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-in.cc @@ -36,7 +36,7 @@ void test05() typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; - bool test = true; + bool test __attribute__((unused)) = true; // int_type sbumpc() // if read_cur not avail returns uflow(), else return *read_cur & increment @@ -72,7 +72,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-io.cc index 54a3047ad00..a2804584a0b 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-io.cc @@ -37,7 +37,7 @@ void test05() typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; - bool test = true; + bool test __attribute__((unused)) = true; // int_type sbumpc() // if read_cur not avail returns uflow(), else return *read_cur & increment @@ -84,7 +84,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-out.cc index a650e8eab96..37048f2dc82 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-out.cc @@ -36,7 +36,7 @@ void test05() typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; - bool test = true; + bool test __attribute__((unused)) = true; // int_type sbumpc() // if read_cur not avail returns uflow(), else return *read_cur & increment @@ -57,7 +57,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/9825.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/9825.cc index 8e419432ad8..e4468b23b90 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/9825.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/9825.cc @@ -30,7 +30,7 @@ const char name_06[] = "filebuf_virtuals-6.txt"; // empty file, need to create void test12() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; filebuf fbuf; @@ -48,7 +48,7 @@ void test12() fbuf.close(); } -main() +int main() { test12(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/10132-2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/10132-2.cc index a391d22fc03..0d218a60aa6 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/10132-2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/10132-2.cc @@ -113,7 +113,7 @@ struct gnu_char_traits void test07() { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::basic_filebuf<gnu_char_type, gnu_char_traits> gnu_filebuf; try diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-in.cc index 2da27f13dcd..e5f6f99b187 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-in.cc @@ -39,9 +39,8 @@ void test05() typedef filebuf::off_type off_type; typedef filebuf::traits_type traits_type; - bool test = true; + bool test __attribute__((unused)) = true; streamsize strmsz_1, strmsz_2; - streamoff strmof_1, strmof_2; int_type c1; int_type c2; @@ -117,7 +116,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-io.cc index a655fd81ab7..248f819cc8f 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-io.cc @@ -38,9 +38,8 @@ void test05() typedef filebuf::pos_type pos_type; typedef filebuf::off_type off_type; - bool test = true; + bool test __attribute__((unused)) = true; streamsize strmsz_1, strmsz_2; - streamoff strmof_1, strmof_2; int_type c1; int_type c2; @@ -116,7 +115,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-out.cc index 40c62aafe25..f83af783d3c 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-out.cc @@ -39,9 +39,8 @@ void test05() typedef filebuf::off_type off_type; typedef filebuf::traits_type traits_type; - bool test = true; + bool test __attribute__((unused)) = true; streamsize strmsz_1, strmsz_2; - streamoff strmof_1, strmof_2; int_type c1; int_type c2; @@ -117,7 +116,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-in.cc index a1adf32b8be..84a52a74100 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-in.cc @@ -39,9 +39,8 @@ void test05() typedef filebuf::off_type off_type; typedef filebuf::traits_type traits_type; - bool test = true; + bool test __attribute__((unused)) = true; streamsize strmsz_1, strmsz_2; - streamoff strmof_1, strmof_2; int_type c1; int_type c2; @@ -118,7 +117,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-io.cc index fd30a33007d..9fc418f830e 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-io.cc @@ -38,9 +38,8 @@ void test05() typedef filebuf::pos_type pos_type; typedef filebuf::off_type off_type; - bool test = true; + bool test __attribute__((unused)) = true; streamsize strmsz_1, strmsz_2; - streamoff strmof_1, strmof_2; int_type c1; int_type c2; @@ -115,7 +114,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-out.cc index 786fb245a16..cae238940cd 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-out.cc @@ -39,9 +39,8 @@ void test05() typedef filebuf::off_type off_type; typedef filebuf::traits_type traits_type; - bool test = true; + bool test __attribute__((unused)) = true; streamsize strmsz_1, strmsz_2; - streamoff strmof_1, strmof_2; int_type c1; int_type c2; @@ -116,7 +115,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/3-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/3-in.cc index b0a192d2337..2a798dbbf16 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/3-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/3-in.cc @@ -25,7 +25,7 @@ void test02(std::filebuf& in, bool pass) { - bool test = true; + bool test __attribute__((unused)) = true; using namespace std; typedef streambuf::pos_type pos_type; typedef streambuf::off_type off_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/3-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/3-io.cc index df03ad6cae2..e78abf1ad7d 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/3-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/3-io.cc @@ -25,7 +25,7 @@ void test02(std::filebuf& in, bool pass) { - bool test = true; + bool test __attribute__((unused)) = true; using namespace std; typedef streambuf::pos_type pos_type; typedef streambuf::off_type off_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/3-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/3-out.cc index 8749ff0bea4..d803e5551ff 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/3-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/3-out.cc @@ -25,7 +25,7 @@ void test02(std::filebuf& in, bool pass) { - bool test = true; + bool test __attribute__((unused)) = true; using namespace std; typedef streambuf::pos_type pos_type; typedef streambuf::off_type off_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/wchar_t/1.cc index f3f3cc712d4..003f2816588 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/wchar_t/1.cc @@ -32,7 +32,7 @@ void test01() typedef wfilebuf::pos_type pos_type; typedef wfilebuf::int_type int_type; - bool test = true; + bool test __attribute__((unused)) = true; const char name[] = "tmp_seekoff-1.tst"; const int_type eof = wfilebuf::traits_type::eof(); @@ -117,7 +117,7 @@ void test01() } int_type c1 = fb.sbumpc(); VERIFY( c1 != eof ); - VERIFY( c1 == wstr[index % wlen] ); + VERIFY( static_cast<wchar_t>(c1) == wstr[index % wlen] ); } pos_type p3 = fb.pubseekoff(0, ios_base::cur); diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/wchar_t/2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/wchar_t/2.cc index 9ad978bee9f..91412bcf4ca 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/wchar_t/2.cc @@ -31,7 +31,7 @@ void test02() { using namespace std; typedef wfilebuf::int_type int_type; - bool test = true; + bool test __attribute__((unused)) = true; const char name[] = "tmp_seekoff-2.tst"; locale loc = __gnu_test::try_named_locale("se_NO.UTF-8"); diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/wchar_t/9875_seekoff.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/wchar_t/9875_seekoff.cc index adec7b2130f..e48b6704bbb 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/wchar_t/9875_seekoff.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/wchar_t/9875_seekoff.cc @@ -79,7 +79,7 @@ protected: void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; // seekoff wfilebuf fb; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/10132-3.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/10132-3.cc index 02f7b67047c..fdb817dce2a 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/10132-3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/10132-3.cc @@ -113,7 +113,7 @@ struct gnu_char_traits void test07() { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::basic_filebuf<gnu_char_type, gnu_char_traits> gnu_filebuf; try diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-in.cc index 3230e121ed2..55345b9748a 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-in.cc @@ -39,9 +39,7 @@ void test05() typedef filebuf::off_type off_type; typedef filebuf::traits_type traits_type; - bool test = true; - streamsize strmsz_1, strmsz_2; - streamoff strmof_1, strmof_2; + bool test __attribute__((unused)) = true; int_type c1; int_type c2; @@ -97,7 +95,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-io.cc index ecaa19fb2d8..23f663cda0a 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-io.cc @@ -38,9 +38,7 @@ void test05() typedef filebuf::pos_type pos_type; typedef filebuf::off_type off_type; - bool test = true; - streamsize strmsz_1, strmsz_2; - streamoff strmof_1, strmof_2; + bool test __attribute__((unused)) = true; int_type c1; int_type c2; @@ -97,7 +95,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-out.cc index e3c9ac3f3f3..8773f6e00bb 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-out.cc @@ -39,9 +39,7 @@ void test05() typedef filebuf::off_type off_type; typedef filebuf::traits_type traits_type; - bool test = true; - streamsize strmsz_1, strmsz_2; - streamoff strmof_1, strmof_2; + bool test __attribute__((unused)) = true; int_type c1; int_type c2; @@ -99,7 +97,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-in.cc index 2fde41aed9e..cec2cdf748f 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-in.cc @@ -39,9 +39,7 @@ void test05() typedef filebuf::off_type off_type; typedef filebuf::traits_type traits_type; - bool test = true; - streamsize strmsz_1, strmsz_2; - streamoff strmof_1, strmof_2; + bool test __attribute__((unused)) = true; int_type c1; int_type c2; @@ -98,7 +96,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-io.cc index 71fb68bf3ff..c564e1bda28 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-io.cc @@ -38,9 +38,7 @@ void test05() typedef filebuf::pos_type pos_type; typedef filebuf::off_type off_type; - bool test = true; - streamsize strmsz_1, strmsz_2; - streamoff strmof_1, strmof_2; + bool test __attribute__((unused)) = true; int_type c1; int_type c2; @@ -96,7 +94,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-out.cc index ee8c65f5154..a919f4fc32e 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-out.cc @@ -39,9 +39,7 @@ void test05() typedef filebuf::off_type off_type; typedef filebuf::traits_type traits_type; - bool test = true; - streamsize strmsz_1, strmsz_2; - streamoff strmof_1, strmof_2; + bool test __attribute__((unused)) = true; int_type c1; int_type c2; @@ -98,7 +96,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/3-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/3-in.cc index 70585273b01..39f18de3b05 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/3-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/3-in.cc @@ -25,7 +25,7 @@ void test02(std::filebuf& in, bool pass) { - bool test = true; + bool test __attribute__((unused)) = true; using namespace std; typedef streambuf::pos_type pos_type; typedef streambuf::off_type off_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/3-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/3-io.cc index d0cc3b1f80c..2bf1b831b00 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/3-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/3-io.cc @@ -25,7 +25,7 @@ void test02(std::filebuf& in, bool pass) { - bool test = true; + bool test __attribute__((unused)) = true; using namespace std; typedef streambuf::pos_type pos_type; typedef streambuf::off_type off_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/3-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/3-out.cc index 35e5a4f0db2..9dd1ab8a066 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/3-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/3-out.cc @@ -25,7 +25,7 @@ void test02(std::filebuf& in, bool pass) { - bool test = true; + bool test __attribute__((unused)) = true; using namespace std; typedef streambuf::pos_type pos_type; typedef streambuf::off_type off_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/wchar_t/9875_seekpos.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/wchar_t/9875_seekpos.cc index fc03e0b431a..37ae534eecc 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/wchar_t/9875_seekpos.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/wchar_t/9875_seekpos.cc @@ -79,7 +79,7 @@ protected: void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; // seekpos wfilebuf fb; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/setbuf/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/setbuf/char/1.cc index 25511d93ea6..e0113c9594f 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/setbuf/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/setbuf/char/1.cc @@ -38,7 +38,7 @@ public: bool check_pointers() { - bool test = true; + bool test __attribute__((unused)) = true; test = (this->pbase() == NULL); test &= (this->pptr() == NULL); return test; @@ -57,9 +57,7 @@ void test05() typedef std::filebuf::off_type off_type; typedef size_t size_type; - bool test = true; - - int_type c1; + bool test __attribute__((unused)) = true; { testbuf f_tmp; @@ -74,7 +72,7 @@ void test05() testbuf f_tmp; f_tmp.open(name_01, ios_base::out | ios_base::in); - int_type c1 = f_tmp.sbumpc(); + f_tmp.sbumpc(); // setbuf // pubsetbuf(char_type* s, streamsize n) @@ -83,7 +81,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/setbuf/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/setbuf/char/2.cc index 6261c999c37..7cca957e17f 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/setbuf/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/setbuf/char/2.cc @@ -27,7 +27,7 @@ void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; char buf[512]; const char* strlit = "how to tell a story and other essays: mark twain"; const size_t strlitsize = std::strlen(strlit); @@ -38,7 +38,7 @@ void test01() VERIFY( std::strncmp(strlit, buf, strlitsize) == 0 ); } -main() +int main() { test01(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/setbuf/char/3.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/setbuf/char/3.cc index f7a65870df4..b5512d76534 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/setbuf/char/3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/setbuf/char/3.cc @@ -27,7 +27,7 @@ void test02() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; char buf[512]; const char* strlit = "how to tell a story and other essays: mark twain"; const size_t strlitsize = std::strlen(strlit); @@ -41,7 +41,7 @@ void test02() VERIFY( std::strncmp(strlit, buf, strlitsize) == 0 ); } -main() +int main() { test02(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-in.cc index 2a1012d812e..9b7a942b206 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-in.cc @@ -37,7 +37,7 @@ void test05() typedef std::filebuf::int_type int_type; typedef filebuf::traits_type traits_type; - bool test = true; + bool test __attribute__((unused)) = true; int_type c1, c2, c3; // int_type sgetc() @@ -64,7 +64,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-io.cc index ca92295456e..0395682dec3 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-io.cc @@ -38,7 +38,7 @@ void test05() typedef std::filebuf::int_type int_type; typedef filebuf::traits_type traits_type; - bool test = true; + bool test __attribute__((unused)) = true; int_type c1, c2, c3; // int_type sgetc() @@ -79,7 +79,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-out.cc index cdd9bf47051..a663de2409c 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-out.cc @@ -37,8 +37,8 @@ void test05() typedef std::filebuf::int_type int_type; typedef filebuf::traits_type traits_type; - bool test = true; - int_type c1, c2, c3; + bool test __attribute__((unused)) = true; + int_type c1, c2; // int_type sgetc() // if read_cur not avail, return uflow(), else return *read_cur @@ -62,7 +62,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-in.cc index 3c539de1840..bb08c18636d 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-in.cc @@ -37,7 +37,7 @@ void test05() typedef std::filebuf::int_type int_type; typedef filebuf::traits_type traits_type; - bool test = true; + bool test __attribute__((unused)) = true; int_type c1, c2, c3; // int_type sgetc() @@ -64,7 +64,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-io.cc index 09b6e8a7f0a..1e4bb4ea091 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-io.cc @@ -38,7 +38,7 @@ void test05() typedef std::filebuf::int_type int_type; typedef filebuf::traits_type traits_type; - bool test = true; + bool test __attribute__((unused)) = true; int_type c1, c2, c3; // int_type sgetc() @@ -78,7 +78,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-out.cc index 1db40febda2..0357a0ba4fa 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-out.cc @@ -37,8 +37,8 @@ void test05() typedef std::filebuf::int_type int_type; typedef filebuf::traits_type traits_type; - bool test = true; - int_type c1, c2, c3; + bool test __attribute__((unused)) = true; + int_type c1, c2; // int_type sgetc() // if read_cur not avail, return uflow(), else return *read_cur @@ -63,7 +63,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-in.cc index 523bdeac34b..8f6d83c0597 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-in.cc @@ -37,13 +37,13 @@ void test05() typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; - bool test = true; + bool test __attribute__((unused)) = true; - streamsize strmsz_1, strmsz_2, strmsz_3; + streamsize strmsz_1, strmsz_2; char carray1[13] = ""; char carray2[8192] = ""; char buffer[8192] = ""; - int_type c1, c2, c3, c4; + int_type c1, c4; // streamsize sgetn(char_type *s, streamsize n) // streamsize xsgetn(char_type *s, streamsize n) @@ -79,7 +79,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-io.cc index 9942a822b26..dd2ea4736f4 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-io.cc @@ -38,13 +38,13 @@ void test05() typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; - bool test = true; + bool test __attribute__((unused)) = true; - streamsize strmsz_1, strmsz_2, strmsz_3; + streamsize strmsz_1, strmsz_2; char carray1[13] = ""; char carray2[8192] = ""; char buffer[8192] = ""; - int_type c1, c2, c3, c4; + int_type c1, c4; // streamsize sgetn(char_type *s, streamsize n) // streamsize xsgetn(char_type *s, streamsize n) @@ -92,7 +92,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-out.cc index 1039c397303..9865b7745e7 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-out.cc @@ -37,12 +37,11 @@ void test05() typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; - bool test = true; + bool test __attribute__((unused)) = true; - streamsize strmsz_1, strmsz_2, strmsz_3; - char carray1[13] = ""; + streamsize strmsz_1, strmsz_2; char carray2[8192] = ""; - int_type c1, c2, c3, c4; + int_type c2, c4; // streamsize sgetn(char_type *s, streamsize n) // streamsize xsgetn(char_type *s, streamsize n) @@ -71,7 +70,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-in.cc index 451e6dcfee3..e77cfee94d7 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-in.cc @@ -37,13 +37,12 @@ void test05() typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; - bool test = true; + bool test __attribute__((unused)) = true; - streamsize strmsz_1, strmsz_2, strmsz_3; - int i = 0, j = 0, k = 0; + streamsize strmsz_1, strmsz_2; char carray1[13] = ""; char carray2[8192] = ""; - int_type c1, c2, c3, c4; + int_type c1, c4; // streamsize sgetn(char_type *s, streamsize n) // streamsize xsgetn(char_type *s, streamsize n) @@ -76,7 +75,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-io.cc index a3fd754e36d..90f00879132 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-io.cc @@ -38,13 +38,12 @@ void test05() typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; - bool test = true; + bool test __attribute__((unused)) = true; - streamsize strmsz_1, strmsz_2, strmsz_3; - int i = 0, j = 0, k = 0; + streamsize strmsz_1, strmsz_2; char carray1[13] = ""; char carray2[8192] = ""; - int_type c1, c2, c3, c4; + int_type c1, c4; // streamsize sgetn(char_type *s, streamsize n) // streamsize xsgetn(char_type *s, streamsize n) @@ -88,7 +87,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-out.cc index c0e6be07443..e94de1c9378 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-out.cc @@ -37,13 +37,11 @@ void test05() typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; - bool test = true; + bool test __attribute__((unused)) = true; - streamsize strmsz_1, strmsz_2, strmsz_3; - int i = 0, j = 0, k = 0; - char carray1[13] = ""; + streamsize strmsz_1, strmsz_2; char carray2[8192] = ""; - int_type c1, c2, c3, c4; + int_type c2, c4; // streamsize sgetn(char_type *s, streamsize n) // streamsize xsgetn(char_type *s, streamsize n) @@ -72,7 +70,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/3.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/3.cc index d3e41805938..517d35e64ee 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/3.cc @@ -29,7 +29,7 @@ void test06() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; char buffer[] = "xxxxxxxxxx"; typedef filebuf::int_type int_type; filebuf fbuf01; @@ -39,7 +39,7 @@ void test06() VERIFY( buffer[0] == '/' ); } -main() +int main() { test06(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/showmanyc/char/9533-1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/showmanyc/char/9533-1.cc index 3c740216876..057f72de32c 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/showmanyc/char/9533-1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/showmanyc/char/9533-1.cc @@ -33,7 +33,7 @@ void test_01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; const char* name = "tmp_fifo1"; const int count = 10000; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/showmanyc/char/9533-2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/showmanyc/char/9533-2.cc index 3a6aa302cce..1e62cf2389e 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/showmanyc/char/9533-2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/showmanyc/char/9533-2.cc @@ -25,7 +25,7 @@ void test_02() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; const char* name = "tmp_file1"; const char* strlit = "0123456789"; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-in.cc index d2d9d3b1c55..1d22aa5c693 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-in.cc @@ -38,8 +38,8 @@ void test05() typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; - bool test = true; - int_type c1, c2, c3; + bool test __attribute__((unused)) = true; + int_type c1; // int_type snextc() // calls sbumpc and if sbumpc != eof, return sgetc @@ -77,7 +77,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-io.cc index 973d89b41f3..93764d9d7ec 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-io.cc @@ -38,8 +38,8 @@ void test05() typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; - bool test = true; - int_type c1, c2, c3; + bool test __attribute__((unused)) = true; + int_type c1, c3; // int_type snextc() // calls sbumpc and if sbumpc != eof, return sgetc @@ -76,7 +76,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-out.cc index fd7124a1448..6d26eac49cf 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-out.cc @@ -38,8 +38,8 @@ void test05() typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; - bool test = true; - int_type c1, c2, c3; + bool test __attribute__((unused)) = true; + int_type c2; // int_type snextc() // calls sbumpc and if sbumpc != eof, return sgetc @@ -59,7 +59,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-in.cc index fc89dd5e644..e30a2c6416e 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-in.cc @@ -36,8 +36,8 @@ void test05() typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; - bool test = true; - int_type c1, c2, c3; + bool test __attribute__((unused)) = true; + int_type c1; // int_type snextc() // calls sbumpc and if sbumpc != eof, return sgetc @@ -75,7 +75,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-io.cc index 8c2c0e868e5..151b6367b14 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-io.cc @@ -37,8 +37,8 @@ void test05() typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; - bool test = true; - int_type c1, c2, c3; + bool test __attribute__((unused)) = true; + int_type c1, c3; // int_type snextc() // calls sbumpc and if sbumpc != eof, return sgetc @@ -74,7 +74,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-out.cc index 816c3f85406..9627d2ac665 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-out.cc @@ -36,8 +36,8 @@ void test05() typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; - bool test = true; - int_type c1, c2, c3; + bool test __attribute__((unused)) = true; + int_type c2; // int_type snextc() // calls sbumpc and if sbumpc != eof, return sgetc @@ -56,7 +56,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/1-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/1-in.cc index 1d216e8ec20..35665f55e3b 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/1-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/1-in.cc @@ -37,7 +37,7 @@ void test01() typedef std::filebuf::int_type int_type; typedef filebuf::traits_type traits_type; - bool test = true; + bool test __attribute__((unused)) = true; int_type c1, c2, c3; // int_type sputbackc(char_type c) @@ -85,7 +85,7 @@ void test01() } } -main() +int main() { test01(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/1-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/1-io.cc index d867e5b87a2..27c50b22a98 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/1-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/1-io.cc @@ -38,7 +38,7 @@ void test01() typedef filebuf::traits_type traits_type; typedef size_t size_type; - bool test = true; + bool test __attribute__((unused)) = true; streamsize strmsz_1, strmsz_2; int_type c1, c2, c3; @@ -95,7 +95,7 @@ void test01() } } -main() +int main() { test01(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/1-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/1-out.cc index 5b5dbb557c1..1f20f19901d 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/1-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/1-out.cc @@ -37,8 +37,8 @@ void test01() typedef std::filebuf::int_type int_type; typedef filebuf::traits_type traits_type; - bool test = true; - int_type c1, c2, c3; + bool test __attribute__((unused)) = true; + int_type c1, c2; // int_type sputbackc(char_type c) // if in_cur not avail || ! traits::eq(c, gptr() [-1]), return pbfail @@ -63,7 +63,7 @@ void test01() } } -main() +int main() { test01(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/2-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/2-in.cc index a9267cf0034..52900e84eb3 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/2-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/2-in.cc @@ -37,7 +37,7 @@ void test01() typedef std::filebuf::int_type int_type; typedef filebuf::traits_type traits_type; - bool test = true; + bool test __attribute__((unused)) = true; int_type c1, c2, c3; // int_type sputbackc(char_type c) @@ -85,7 +85,7 @@ void test01() } } -main() +int main() { test01(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/2-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/2-io.cc index e7166106d59..0174a928e89 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/2-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/2-io.cc @@ -38,7 +38,7 @@ void test01() typedef filebuf::traits_type traits_type; typedef size_t size_type; - bool test = true; + bool test __attribute__((unused)) = true; streamsize strmsz_1, strmsz_2; int_type c1, c2, c3; @@ -94,7 +94,7 @@ void test01() } } -main() +int main() { test01(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/2-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/2-out.cc index 2ff9a6c5aad..ce6de8ec076 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/2-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/2-out.cc @@ -37,8 +37,8 @@ void test01() typedef std::filebuf::int_type int_type; typedef filebuf::traits_type traits_type; - bool test = true; - int_type c1, c2, c3; + bool test __attribute__((unused)) = true; + int_type c1, c2; // int_type sputbackc(char_type c) // if in_cur not avail || ! traits::eq(c, gptr() [-1]), return pbfail @@ -64,7 +64,7 @@ void test01() } } -main() +int main() { test01(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/9425.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/9425.cc index b5e470f332a..5ad5aeea235 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/9425.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/9425.cc @@ -31,7 +31,7 @@ const char name_01[] = "filebuf_virtuals-1.txt"; // file with data in it void test09() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; filebuf fbuf; fbuf.open(name_01, ios_base::in); @@ -41,7 +41,7 @@ void test09() VERIFY( r == filebuf::traits_type::eof() ); } -main() +int main() { test09(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1-in.cc index 31b176bcbf6..e331e69b07d 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1-in.cc @@ -37,10 +37,8 @@ void test05() typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; - bool test = true; - streamsize strmsz_1, strmsz_2; - int i = 0, j = 0, k = 0; - int_type c1, c2, c3; + bool test __attribute__((unused)) = true; + int_type c3; // int_type sputc(char_type c) // if out_cur not avail, return overflow(traits_type::to_int_type(c)) @@ -58,7 +56,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1-io.cc index 275def18397..94b4c624ae5 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1-io.cc @@ -38,10 +38,8 @@ void test05() typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; - bool test = true; - streamsize strmsz_1, strmsz_2; - int i = 0, j = 0, k = 0; - int_type c1, c2, c3; + bool test __attribute__((unused)) = true; + int_type c1, c2; // int_type sputc(char_type c) // if out_cur not avail, return overflow(traits_type::to_int_type(c)) @@ -65,7 +63,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1-out.cc index 09086b07d60..6219b34062e 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1-out.cc @@ -37,10 +37,8 @@ void test05() typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; - bool test = true; - streamsize strmsz_1, strmsz_2; - int i = 0, j = 0, k = 0; - int_type c1, c2, c3; + bool test __attribute__((unused)) = true; + int_type c1, c2; // int_type sputc(char_type c) // if out_cur not avail, return overflow(traits_type::to_int_type(c)) @@ -64,7 +62,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-in.cc index 680e058a904..70ef74bf1c0 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-in.cc @@ -37,10 +37,8 @@ void test05() typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; - bool test = true; - streamsize strmsz_1, strmsz_2; - int i = 0, j = 0, k = 0; - int_type c1, c2, c3; + bool test __attribute__((unused)) = true; + int_type c3; // int_type sputc(char_type c) // if out_cur not avail, return overflow(traits_type::to_int_type(c)) @@ -59,7 +57,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-io.cc index abbdea55fbd..069982adae9 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-io.cc @@ -38,10 +38,8 @@ void test05() typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; - bool test = true; - streamsize strmsz_1, strmsz_2; - int i = 0, j = 0, k = 0; - int_type c1, c2, c3; + bool test __attribute__((unused)) = true; + int_type c1, c2; // int_type sputc(char_type c) // if out_cur not avail, return overflow(traits_type::to_int_type(c)) @@ -64,7 +62,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-out.cc index 78e2b4eb3d6..d0a24ddb60d 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-out.cc @@ -37,10 +37,8 @@ void test05() typedef filebuf::int_type int_type; typedef filebuf::traits_type traits_type; - bool test = true; - streamsize strmsz_1, strmsz_2; - int i = 0, j = 0, k = 0; - int_type c1, c2, c3; + bool test __attribute__((unused)) = true; + int_type c1, c2; // int_type sputc(char_type c) // if out_cur not avail, return overflow(traits_type::to_int_type(c)) @@ -65,7 +63,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/9701-2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/9701-2.cc index 1d100dd3ede..85941c81b2d 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/9701-2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/9701-2.cc @@ -46,7 +46,7 @@ public: // libstdc++/9701 (partial) void test11() { - bool test = true; + bool test __attribute__((unused)) = true; bool over_expected; @@ -64,7 +64,7 @@ void test11() dfbuf_01.close(); } -main() +int main() { test11(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-in.cc index 4888f23bb16..c5a860db60d 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-in.cc @@ -38,8 +38,8 @@ void test05() typedef filebuf::traits_type traits_type; typedef size_t size_type; - bool test = true; - streamsize strmsz_1, strmsz_2; + bool test __attribute__((unused)) = true; + streamsize strmsz_1; // streamsize sputn(const char_typs* s, streamsize n) // write up to n chars to out_cur from s, returning number assigned @@ -56,7 +56,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-io.cc index 7f32662d315..84eb9f81cc1 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-io.cc @@ -39,7 +39,7 @@ void test05() typedef filebuf::traits_type traits_type; typedef size_t size_type; - bool test = true; + bool test __attribute__((unused)) = true; streamsize strmsz_1, strmsz_2; // streamsize sputn(const char_typs* s, streamsize n) @@ -62,7 +62,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-out.cc index d17db7abf3b..3753a4be262 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-out.cc @@ -38,8 +38,8 @@ void test05() typedef filebuf::traits_type traits_type; typedef size_t size_type; - bool test = true; - streamsize strmsz_1, strmsz_2; + bool test __attribute__((unused)) = true; + streamsize strmsz_1; // streamsize sputn(const char_typs* s, streamsize n) // write up to n chars to out_cur from s, returning number assigned @@ -58,7 +58,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/2-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/2-in.cc index a9f188cf410..a2a2322dd86 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/2-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/2-in.cc @@ -38,8 +38,8 @@ void test05() typedef filebuf::traits_type traits_type; typedef size_t size_type; - bool test = true; - streamsize strmsz_1, strmsz_2; + bool test __attribute__((unused)) = true; + streamsize strmsz_1; // streamsize sputn(const char_typs* s, streamsize n) // write up to n chars to out_cur from s, returning number assigned @@ -57,7 +57,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/2-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/2-io.cc index 2dc0204c94e..fce28d32ce3 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/2-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/2-io.cc @@ -39,7 +39,7 @@ void test05() typedef filebuf::traits_type traits_type; typedef size_t size_type; - bool test = true; + bool test __attribute__((unused)) = true; streamsize strmsz_1, strmsz_2; // streamsize sputn(const char_typs* s, streamsize n) @@ -61,7 +61,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/2-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/2-out.cc index 26046b17a35..9a4fa156b42 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/2-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/2-out.cc @@ -38,8 +38,8 @@ void test05() typedef filebuf::traits_type traits_type; typedef size_t size_type; - bool test = true; - streamsize strmsz_1, strmsz_2; + bool test __attribute__((unused)) = true; + streamsize strmsz_1; // streamsize sputn(const char_typs* s, streamsize n) // write up to n chars to out_cur from s, returning number assigned @@ -59,7 +59,7 @@ void test05() } } -main() +int main() { test05(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/9339.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/9339.cc index fb931398620..4fd774ee4a1 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/9339.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/9339.cc @@ -23,7 +23,7 @@ void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; filebuf fbuf01; int len = 35; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/9701-1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/9701-1.cc index b675d79d0bb..7335ca79992 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/9701-1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/9701-1.cc @@ -50,7 +50,7 @@ public: // libstdc++/9701 (partial) void test11() { - bool test = true; + bool test __attribute__((unused)) = true; bool over_expected; @@ -68,7 +68,7 @@ void test11() dfbuf_02.close(); } -main() +int main() { test11(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/1-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/1-in.cc index 7e3b9c07621..873efa1c27f 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/1-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/1-in.cc @@ -37,7 +37,7 @@ void test01() typedef std::filebuf::int_type int_type; typedef filebuf::traits_type traits_type; - bool test = true; + bool test __attribute__((unused)) = true; int_type c1, c2, c3; // int_type sungetc() @@ -64,7 +64,7 @@ void test01() } } -main() +int main() { test01(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/1-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/1-io.cc index 5cbaf1b8db2..fb45945119b 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/1-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/1-io.cc @@ -38,7 +38,7 @@ void test01() typedef filebuf::traits_type traits_type; typedef size_t size_type; - bool test = true; + bool test __attribute__((unused)) = true; streamsize strmsz_1, strmsz_2; int_type c1, c2, c3; @@ -76,7 +76,7 @@ void test01() } } -main() +int main() { test01(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/1-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/1-out.cc index daefb70b997..8c8737d601e 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/1-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/1-out.cc @@ -37,8 +37,8 @@ void test01() typedef std::filebuf::int_type int_type; typedef filebuf::traits_type traits_type; - bool test = true; - int_type c1, c2, c3; + bool test __attribute__((unused)) = true; + int_type c1, c2; // int_type sungetc() // if in_cur not avail, return pbackfail(), else decrement and @@ -63,7 +63,7 @@ void test01() } } -main() +int main() { test01(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/2-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/2-in.cc index d35a3f2ae8b..d0bbb5b21db 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/2-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/2-in.cc @@ -37,7 +37,7 @@ void test01() typedef std::filebuf::int_type int_type; typedef filebuf::traits_type traits_type; - bool test = true; + bool test __attribute__((unused)) = true; int_type c1, c2, c3; // int_type sungetc() @@ -65,7 +65,7 @@ void test01() } } -main() +int main() { test01(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/2-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/2-io.cc index b45ba2676bf..72f90ed08a4 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/2-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/2-io.cc @@ -38,7 +38,7 @@ void test01() typedef filebuf::traits_type traits_type; typedef size_t size_type; - bool test = true; + bool test __attribute__((unused)) = true; streamsize strmsz_1, strmsz_2; int_type c1, c2, c3; @@ -75,7 +75,7 @@ void test01() } } -main() +int main() { test01(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/2-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/2-out.cc index f08df15e7b8..73718d9fa45 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/2-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/2-out.cc @@ -37,8 +37,8 @@ void test01() typedef std::filebuf::int_type int_type; typedef filebuf::traits_type traits_type; - bool test = true; - int_type c1, c2, c3; + bool test __attribute__((unused)) = true; + int_type c1, c2; // int_type sungetc() // if in_cur not avail, return pbackfail(), else decrement and @@ -64,7 +64,7 @@ void test01() } } -main() +int main() { test01(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sync/char/1057.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sync/char/1057.cc index 02feef5a6e8..a3071b787bd 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sync/char/1057.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sync/char/1057.cc @@ -80,7 +80,7 @@ public: // libstdc++/1057 void test04() { - bool test = true; + bool test __attribute__((unused)) = true; std::string text = "abcdefghijklmn"; // 01 diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sync/char/9182-1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sync/char/9182-1.cc index a0411e2fff3..9448c8490c7 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sync/char/9182-1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sync/char/9182-1.cc @@ -51,7 +51,7 @@ protected: void test13() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; locale loc = locale::classic(); loc = locale(loc, new errorcvt); @@ -65,7 +65,7 @@ void test13() fbuf1.close(); } -main() +int main() { test13(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/char/1.cc index 40e51371c9c..60d5d38d78d 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/char/1.cc @@ -47,7 +47,7 @@ protected: void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; const char* name = "filebuf_virtuals-1.txt"; string str; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/char/10097.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/char/10097.cc index 695ca8221b5..156421092dd 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/char/10097.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/char/10097.cc @@ -48,7 +48,7 @@ public: void test16() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; const char* name = "tmp_fifo1"; @@ -97,7 +97,7 @@ void test16() fb.close(); } -main() +int main() { test16(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/char/2.cc index 8032a42f6c8..da498f2112c 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/char/2.cc @@ -25,7 +25,7 @@ void test01() { - bool test = true; + bool test __attribute__((unused)) = true; using namespace std; filebuf fb_out, fb_in_out; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/char/9027.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/char/9027.cc index 0e4c077bc21..768cba16172 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/char/9027.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/char/9027.cc @@ -62,7 +62,7 @@ void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; const char* name = "filebuf_virtuals-1.txt"; locale loc (locale::classic(), new Cvt_to_upper); diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/1.cc index d55b89c90ac..8afb2b6621a 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/1.cc @@ -29,7 +29,7 @@ void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; const char name[] = "tmp_underflow-1.tst"; const char cstr[] = @@ -99,7 +99,7 @@ void test01() streamsize n = fb.sgetn(wbuf, wlen + 1); fb.close(); - VERIFY( n == wlen ); + VERIFY( n == static_cast<streamsize>(wlen) ); VERIFY( !wmemcmp(wbuf, wstr, wlen) ); } diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-1.cc index d0753650d12..ba59cb0d7c7 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-1.cc @@ -26,7 +26,7 @@ const char name_01[] = "tmp_11389-1"; void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; filebuf fbout; fbout.open(name_01, ios_base::out); diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-2.cc index 1717f2a5aeb..3917ca5a846 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-2.cc @@ -26,7 +26,7 @@ const char name_02[] = "tmp_11389-2"; void test02() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; filebuf fbout; fbout.open(name_02, ios_base::out); diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-3.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-3.cc index c23cb56f26b..dcf164bb37d 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-3.cc @@ -26,7 +26,7 @@ const char name_03[] = "tmp_11389-3"; void test03() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; filebuf fbout; fbout.open(name_03, ios_base::out); diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-4.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-4.cc index ec2f0f89245..5b4ebe4f6ef 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-4.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-4.cc @@ -26,7 +26,7 @@ const char name_04[] = "tmp_11389-4"; void test04() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; filebuf fbout; fbout.open(name_04, ios_base::out); diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/2.cc index 77616ed5d91..5f255b2dc22 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/2.cc @@ -29,7 +29,7 @@ void test02() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; const char name[] = "tmp_underflow-2.tst"; const char cstr[] = @@ -100,7 +100,7 @@ void test02() streamsize n = fb.sgetn(wbuf, wlen + 1); fb.close(); - VERIFY( n == wlen ); + VERIFY( n == static_cast<streamsize>(wlen) ); VERIFY( !wmemcmp(wbuf, wstr, wlen) ); } diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/3.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/3.cc index 169d3ebfa25..8812f1e3828 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/3.cc @@ -29,7 +29,7 @@ void test03() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; const char name[] = "tmp_underflow-3.tst"; const char cstr[] = @@ -101,7 +101,7 @@ void test03() for (int i = 0; i < loops; ++i) { streamsize n = fb.sgetn(wbuf, wlen); - VERIFY( n == wlen ); + VERIFY( n == static_cast<streamsize>(wlen) ); VERIFY( !wmemcmp(wbuf, wstr, wlen) ); } diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/4.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/4.cc index 00fb3774489..75301590050 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/4.cc @@ -27,7 +27,7 @@ void test01() { - bool test = true; + bool test __attribute__((unused)) = true; using namespace std; locale loc (__gnu_test::try_named_locale("se_NO.UTF-8")); @@ -41,7 +41,7 @@ void test01() fb_out.close(); fb_in_out.open("tmp_underflow.tst", ios::in | ios::out); - while (fb_in_out.sbumpc() != filebuf::traits_type::eof()); + while (fb_in_out.sbumpc() != wfilebuf::traits_type::eof()); VERIFY( fb_in_out.sputc(L'x') == L'x' ); fb_in_out.close(); diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/5.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/5.cc index f8636b0cc30..5d8e25e5325 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/5.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/5.cc @@ -29,7 +29,7 @@ void test05() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; const char* name = "tmp_underflow-5"; wfilebuf fb; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/9178.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/9178.cc index 8a5797053fb..3059724b44e 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/9178.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/9178.cc @@ -162,7 +162,7 @@ protected: void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; locale loc; loc = locale(loc, new checksumcvt<wchar_t>); diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/9520.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/9520.cc index 5bd831378d7..f1fd8ef412c 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/9520.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/9520.cc @@ -27,7 +27,7 @@ void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; const char* name = "tmp_9520"; FILE* file = fopen(name, "w"); diff --git a/libstdc++-v3/testsuite/27_io/basic_fstream/3.cc b/libstdc++-v3/testsuite/27_io/basic_fstream/3.cc index 4f78ed0d193..c71e0e86b94 100644 --- a/libstdc++-v3/testsuite/27_io/basic_fstream/3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_fstream/3.cc @@ -117,7 +117,7 @@ struct gnu_char_traits void test07() { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::basic_fstream<gnu_char_type, gnu_char_traits> gnu_fstr; try diff --git a/libstdc++-v3/testsuite/27_io/basic_fstream/4.cc b/libstdc++-v3/testsuite/27_io/basic_fstream/4.cc index a7f46d61d8a..cf838faab05 100644 --- a/libstdc++-v3/testsuite/27_io/basic_fstream/4.cc +++ b/libstdc++-v3/testsuite/27_io/basic_fstream/4.cc @@ -29,7 +29,7 @@ void test01() typedef std::fstream test_type; typedef std::iostream base_type; const test_type& obj = test_type(); - const base_type* base = &obj; + const base_type* base __attribute__((unused)) = &obj; } int main() diff --git a/libstdc++-v3/testsuite/27_io/basic_fstream/rdbuf/char/2832.cc b/libstdc++-v3/testsuite/27_io/basic_fstream/rdbuf/char/2832.cc index 136252b8efb..b5606c0169f 100644 --- a/libstdc++-v3/testsuite/27_io/basic_fstream/rdbuf/char/2832.cc +++ b/libstdc++-v3/testsuite/27_io/basic_fstream/rdbuf/char/2832.cc @@ -34,9 +34,8 @@ active_buffer(std::ios& stream) // libstdc++/2832 void test02() { - bool test = true; + bool test __attribute__((unused)) = true; const char* strlit01 = "fuck war"; - const char* strlit02 = "two less cars abstract riot crew, critical mass/SF"; const std::string str00; const std::string str01(strlit01); std::string str02; diff --git a/libstdc++-v3/testsuite/27_io/basic_ifstream/3.cc b/libstdc++-v3/testsuite/27_io/basic_ifstream/3.cc index dd38b252c65..7ffd7b3b9af 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ifstream/3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ifstream/3.cc @@ -117,7 +117,7 @@ struct gnu_char_traits void test07() { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::basic_ifstream<gnu_char_type, gnu_char_traits> gnu_ifstr; try diff --git a/libstdc++-v3/testsuite/27_io/basic_ifstream/4.cc b/libstdc++-v3/testsuite/27_io/basic_ifstream/4.cc index 08827c3aec6..3c6efe85d5f 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ifstream/4.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ifstream/4.cc @@ -29,7 +29,7 @@ void test01() typedef std::ifstream test_type; typedef std::istream base_type; const test_type& obj = test_type(); - const base_type* base = &obj; + const base_type* base __attribute__((unused)) = &obj; } int main() diff --git a/libstdc++-v3/testsuite/27_io/basic_ifstream/cons/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ifstream/cons/char/1.cc index e211d0cc643..43ef6ccf91c 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ifstream/cons/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ifstream/cons/char/1.cc @@ -29,7 +29,7 @@ const char name_01[] = "ifstream_members-1.tst"; // http://gcc.gnu.org/ml/libstdc++/2000-07/msg00004.html void test02() { - bool test = true; + bool test __attribute__((unused)) = true; const int more_than_max_open_files = 8200; for (int i = 0; ++i < more_than_max_open_files;) diff --git a/libstdc++-v3/testsuite/27_io/basic_ifstream/open/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ifstream/open/char/1.cc index 5a8b6f8b3a4..dcb89a6dfa2 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ifstream/open/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ifstream/open/char/1.cc @@ -29,7 +29,7 @@ const char name_01[] = "ifstream_members-1.tst"; // http://gcc.gnu.org/ml/libstdc++/2000-06/msg00136.html void test01() { - bool test = true; + bool test __attribute__((unused)) = true; std::ifstream ifs1; ifs1.close(); diff --git a/libstdc++-v3/testsuite/27_io/basic_ifstream/rdbuf/char/2832.cc b/libstdc++-v3/testsuite/27_io/basic_ifstream/rdbuf/char/2832.cc index 947a77dce2b..c07bea1cd3e 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ifstream/rdbuf/char/2832.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ifstream/rdbuf/char/2832.cc @@ -38,9 +38,8 @@ active_buffer(std::ios& stream) // libstdc++/2832 void test03() { - bool test = true; + bool test __attribute__((unused)) = true; const char* strlit01 = "fuck war"; - const char* strlit02 = "two less cars abstract riot crew, critical mass/SF"; const std::string str00; const std::string str01(strlit01); std::string str02; diff --git a/libstdc++-v3/testsuite/27_io/basic_ios/3.cc b/libstdc++-v3/testsuite/27_io/basic_ios/3.cc index fd3742bf8ab..f724788deb4 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ios/3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ios/3.cc @@ -118,7 +118,7 @@ class gnu_ios: public std::basic_ios<gnu_char_type, gnu_char_traits> void test07() { - bool test = true; + bool test __attribute__((unused)) = true; try { gnu_ios obj; } diff --git a/libstdc++-v3/testsuite/27_io/basic_ios/4.cc b/libstdc++-v3/testsuite/27_io/basic_ios/4.cc index b527499dcb4..517799e861b 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ios/4.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ios/4.cc @@ -31,7 +31,7 @@ void test01() std::stringbuf buf; const test_type& obj = test_type(&buf); - const base_type* base = &obj; + const base_type* base __attribute__((unused)) = &obj; } int main() diff --git a/libstdc++-v3/testsuite/27_io/basic_ios/clear/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ios/clear/char/1.cc index 6629371ed03..71b0e170577 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ios/clear/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ios/clear/char/1.cc @@ -36,7 +36,7 @@ // 27.4.4.3 basic_ios iostate flags function void test01() { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::ios_base::fmtflags fmtflags; typedef std::ios_base::iostate iostate; @@ -44,11 +44,7 @@ void test01() iostate iostate02, iostate03; const iostate iostate01 = std::ios_base::badbit | std::ios_base::eofbit; - const iostate iostate04 = std::ios_base::badbit; - std::ios ios_01(NULL); - std::ios::char_type ct01; - std::ios::char_type ct02('x');; // bool fail() const VERIFY( ios_01.fail() ); diff --git a/libstdc++-v3/testsuite/27_io/basic_ios/cons/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ios/cons/char/1.cc index 2c8993afd7e..b3e0624a5de 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ios/cons/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ios/cons/char/1.cc @@ -35,7 +35,7 @@ void test01() { - bool test = true; + bool test __attribute__((unused)) = true; std::string str_01("jade cove, big sur"); std::string str_05; std::stringbuf strb_01; @@ -43,7 +43,7 @@ void test01() std::stringbuf strb_03(str_01, std::ios_base::out); const std::ios_base::fmtflags flag01 = std::ios_base::skipws | std::ios_base::dec; - std::ios_base::fmtflags flag02, flag03; + std::ios_base::fmtflags flag02; const std::locale glocale = std::locale(); // explicit basic_ios(streambuf* sb) diff --git a/libstdc++-v3/testsuite/27_io/basic_ios/cons/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_ios/cons/char/2.cc index 84808f8b14f..6cf94cbc79c 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ios/cons/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ios/cons/char/2.cc @@ -39,7 +39,7 @@ class gnu_ios: public std::basic_ios<char> { }; void test01() { - bool test = true; + bool test __attribute__((unused)) = true; // 01: Doesn't call basic_ios::init, which uses ctype<char_type>.. // This should be unambiguously correct. diff --git a/libstdc++-v3/testsuite/27_io/basic_ios/cons/char/3.cc b/libstdc++-v3/testsuite/27_io/basic_ios/cons/char/3.cc index a0f7afa4287..0db96304d0f 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ios/cons/char/3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ios/cons/char/3.cc @@ -125,7 +125,7 @@ namespace std void test02() { - bool test = true; + bool test __attribute__((unused)) = true; // 02: Calls basic_ios::init, which may call ctype<char_type>... try diff --git a/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/1.cc index 191cbb60830..edc407fd55a 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/1.cc @@ -36,16 +36,12 @@ // 27.4.4.3 basic_ios iostate flags function void test02() { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::ios_base::fmtflags fmtflags; typedef std::ios_base::iostate iostate; using std::ios_base; - iostate iostate02, iostate03; - const iostate iostate01 = std::ios_base::badbit | std::ios_base::eofbit; - const iostate iostate04 = std::ios_base::badbit; - // basic_ios& copyfmt(const basic_ios& rhs) { std::ios ios_01(NULL); diff --git a/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/2.cc index 3286411eb62..638bd46e141 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/2.cc @@ -36,7 +36,7 @@ // copyfmt and locales. void test03() { - bool test = true; + bool test __attribute__((unused)) = true; using namespace std; diff --git a/libstdc++-v3/testsuite/27_io/basic_ios/exceptions/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ios/exceptions/char/1.cc index f593b90259d..4c3352fba80 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ios/exceptions/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ios/exceptions/char/1.cc @@ -35,17 +35,14 @@ void test01() { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::ios_base::fmtflags fmtflags; typedef std::ios_base::iostate iostate; using std::ios_base; - iostate iostate02, iostate03; - const iostate iostate01 = std::ios_base::badbit | std::ios_base::eofbit; - const iostate iostate04 = std::ios_base::badbit; - // iostate exceptions() const + iostate iostate02; { std::ios ios_01(NULL); VERIFY( ios_01.exceptions() == std::ios_base::goodbit ); diff --git a/libstdc++-v3/testsuite/27_io/basic_ios/locales/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ios/locales/char/1.cc index a95bd99c4dc..81779bae62f 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ios/locales/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ios/locales/char/1.cc @@ -35,12 +35,7 @@ void test01() { - bool test = true; - - std::ios_base::fmtflags flag02, flag03; - const std::ios_base::fmtflags flag01 = std::ios_base::skipws - | std::ios_base::dec; - + bool test __attribute__((unused)) = true; const std::locale c_loc = std::locale::classic(); std::ios ios_01(NULL); diff --git a/libstdc++-v3/testsuite/27_io/basic_iostream/3.cc b/libstdc++-v3/testsuite/27_io/basic_iostream/3.cc index 004a363063d..2c539cf0de0 100644 --- a/libstdc++-v3/testsuite/27_io/basic_iostream/3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_iostream/3.cc @@ -117,7 +117,7 @@ struct gnu_char_traits void test07() { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::basic_iostream<gnu_char_type, gnu_char_traits> gnu_iostr; try diff --git a/libstdc++-v3/testsuite/27_io/basic_iostream/4.cc b/libstdc++-v3/testsuite/27_io/basic_iostream/4.cc index dbcf8303746..0c47e675162 100644 --- a/libstdc++-v3/testsuite/27_io/basic_iostream/4.cc +++ b/libstdc++-v3/testsuite/27_io/basic_iostream/4.cc @@ -32,8 +32,8 @@ void test01() std::stringbuf buf; const test_type& obj = test_type(&buf); - const base_type1* base1 = &obj; - const base_type2* base2 = &obj; + const base_type1* base1 __attribute__((unused)) = &obj; + const base_type2* base2 __attribute__((unused)) = &obj; } int main() diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/3.cc b/libstdc++-v3/testsuite/27_io/basic_istream/3.cc index 8bd7b8a7226..d9f8570bbdb 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/3.cc @@ -117,7 +117,7 @@ struct gnu_char_traits void test07() { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::basic_istream<gnu_char_type, gnu_char_traits> gnu_istr; try diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/4.cc b/libstdc++-v3/testsuite/27_io/basic_istream/4.cc index 4282fef84b2..fe7a394691a 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/4.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/4.cc @@ -31,7 +31,7 @@ void test01() std::stringbuf buf; const test_type& obj = test_type(&buf); - const base_type* base = &obj; + const base_type* base __attribute__((unused)) = &obj; } int main() diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/exceptions/char/9561.cc b/libstdc++-v3/testsuite/27_io/basic_istream/exceptions/char/9561.cc index 055c4fb02c5..315b651c93c 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/exceptions/char/9561.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/exceptions/char/9561.cc @@ -40,7 +40,7 @@ struct buf: std::streambuf void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; buf b; std::istream strm (&b); diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/01.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/01.cc index 9c3b3605cb8..ef4e6ada684 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/01.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/01.cc @@ -46,11 +46,10 @@ std::stringstream ss_01(str_01); // minimal sanity check bool test01() { - bool test = true; + bool test __attribute__((unused)) = true; // Integral Types: bool b1 = false; - bool b2 = false; short s1 = 0; int i1 = 0; long l1 = 0; @@ -117,7 +116,7 @@ bool test01() { ss_01 << po; ss_01 >> pi; - std::printf ("%x %x\n", pi, po); + std::printf ("%p %p\n", pi, po); VERIFY( po == pi ); return test; } diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/02.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/02.cc index 94136d2e168..7a5e4450261 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/02.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/02.cc @@ -46,7 +46,7 @@ std::stringstream ss_01(str_01); // elaborated test for ints bool test02() { - bool test = true; + bool test __attribute__((unused)) = true; const std::string str_01("20000AB"); std::stringbuf strb_01(str_01, std::ios_base::in); std::istream is(&strb_01); diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/03.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/03.cc index 65306c4d6e3..9b467d37487 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/03.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/03.cc @@ -49,7 +49,7 @@ bool test03() std::istream istr(&sbuf); std::ostream ostr(&sbuf); - bool test = true; + bool test __attribute__((unused)) = true; long l01; ostr << "12220101"; istr >> l01; // _M_in_end set completely incorrectly here. diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/06.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/06.cc index 206c81e506b..5c615aaebb6 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/06.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/06.cc @@ -48,8 +48,8 @@ std::stringstream ss_01(str_01); void test06() { // default locale, grouping is turned off - bool test = true; - unsigned int h4, h3, h2; + bool test __attribute__((unused)) = true; + unsigned int h4; char c; std::string s("205,199,144"); std::istringstream is(s); diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/07.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/07.cc index 6167471ba49..5efff5744a6 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/07.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/07.cc @@ -56,7 +56,7 @@ namespace std { void test07() { // manufactured locale, grouping is turned on - bool test = true; + bool test __attribute__((unused)) = true; unsigned int h4 = 0, h3 = 0, h2 = 0; float f1 = 0.0; const std::string s1("205,199 23,445.25 1,024,365 123,22,24"); diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/08.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/08.cc index 2a2c3cc1ff7..276fd913dfc 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/08.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/08.cc @@ -56,9 +56,8 @@ namespace std { void test08() { // manufactured locale, grouping is turned on - bool test = true; + bool test __attribute__((unused)) = true; unsigned int h4 = 0, h3 = 0, h2 = 0; - float f1 = 0.0; const std::string s1("1,22 205,19 22,123,22"); const std::string s2("1,220 2050,19 202,123,22"); diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/09.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/09.cc index 67d98d53de8..23e68a7629b 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/09.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/09.cc @@ -45,7 +45,7 @@ std::stringstream ss_01(str_01); bool test09() { - bool test = true; + bool test __attribute__((unused)) = true; std::string st("2.456e3-+0.567e-2"); std::stringbuf sb(st); diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/10.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/10.cc index de7bbf9ada8..5df68d5845d 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/10.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/10.cc @@ -48,7 +48,7 @@ bool test10() { std::stringbuf isbuf_01(str_01); std::istream is_01(&isbuf_01); - bool test = true; + bool test __attribute__((unused)) = true; int n = 365; is_01 >> n; diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/11.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/11.cc index 309875dfc54..fc7d25e6ae2 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/11.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/11.cc @@ -48,7 +48,7 @@ std::stringstream ss_01(str_01); // libstdc++/90 bool test11() { - bool test = true; + bool test __attribute__((unused)) = true; const char* cstrlit = "0x2a"; // sanity check via 'C' library call diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/12.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/12.cc index 4d7a7fe6825..93952bc9e37 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/12.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/12.cc @@ -50,7 +50,7 @@ std::stringstream ss_01(str_01); template<typename T> bool test12_aux(bool integer_type) { - bool test = true; + bool test __attribute__((unused)) = true; int digits_overflow; if (integer_type) @@ -62,7 +62,7 @@ bool test12_aux(bool integer_type) std::string st; std::string part = "1234567890123456789012345678901234567890"; - for (int i = 0; i < digits_overflow / part.size() + 1; ++i) + for (std::size_t i = 0; i < digits_overflow / part.size() + 1; ++i) st += part; std::stringbuf sb(st); std::istream is(&sb); @@ -74,7 +74,7 @@ bool test12_aux(bool integer_type) bool test12() { - bool test = true; + bool test __attribute__((unused)) = true; VERIFY(test12_aux<short>(true)); VERIFY(test12_aux<int>(true)); VERIFY(test12_aux<long>(true)); diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/13.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/13.cc index 935d456f448..22896df79f3 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/13.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/13.cc @@ -47,8 +47,7 @@ std::stringstream ss_01(str_01); void test13() { using namespace std; - bool test = true; - const char* l1 = "12345678901234567890123456789012345678901234567890123456"; + bool test __attribute__((unused)) = true; const char* l2 = "1.2345678901234567890123456789012345678901234567890123456" " " "1246.9"; diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/9555-ia.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/9555-ia.cc index 5a87fb98582..20476a96e54 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/9555-ia.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/9555-ia.cc @@ -38,7 +38,7 @@ struct buf: std::streambuf template<typename T> void testthrow(T arg) { - bool test = true; + bool test __attribute__((unused)) = true; buf b; std::istream is(&b); is.exceptions(std::ios::badbit); diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/1.cc index 0a235bbe819..f17fd059593 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/1.cc @@ -26,7 +26,7 @@ void test01() { - bool test = true; + bool test __attribute__((unused)) = true; std::string str_01; const std::string str_02("coltrane playing 'softly as a morning sunrise'"); const std::string str_03("coltrane"); diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/11095-i.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/11095-i.cc index ec25ebcaa4d..0e7e364b819 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/11095-i.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/11095-i.cc @@ -28,7 +28,7 @@ // operator>>(basic_istream&, _CharT*) void test01() { - bool test = true; + bool test __attribute__((unused)) = true; const std::string str_01("Consoli "); std::stringbuf isbuf_01(str_01, std::ios_base::in); diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/2.cc index d48072cd329..f1469217efc 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/2.cc @@ -28,7 +28,7 @@ void test02() { typedef std::ios::traits_type ctraits_type; - bool test = true; + bool test __attribute__((unused)) = true; std::string str_01; const std::string str_02("or coltrane playing tunji with jimmy garrison"); const std::string str_03("coltrane"); diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/3.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/3.cc index 1ab02a1990e..5e0ca5583ea 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/3.cc @@ -26,7 +26,7 @@ void test01() { - bool test = true; + bool test __attribute__((unused)) = true; std::string str_01; const std::string str_02("coltrane playing 'softly as a morning sunrise'"); const std::string str_03("coltrane"); @@ -44,7 +44,6 @@ void test01() int n = 20; char array1[n]; typedef std::ios::traits_type ctraits_type; - ctraits_type::int_type i1, i2; // testing with width() control enabled. is_02.width(8); diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/9555-ic.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/9555-ic.cc index ba2e8d3c5f4..1900236c1f3 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/9555-ic.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/9555-ic.cc @@ -39,7 +39,7 @@ struct buf: std::streambuf template<typename T> void testthrow(T arg) { - bool test = true; + bool test __attribute__((unused)) = true; buf b; std::istream is(&b); is.exceptions(std::ios::badbit); @@ -55,7 +55,7 @@ void testthrow(T arg) } catch(...) { - VERIFY( false ); + VERIFY( test = false ); } } diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/9826.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/9826.cc index 157084167f5..bb4f3efe225 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/9826.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/9826.cc @@ -45,9 +45,11 @@ void test02() // 1 basic_string<pod_char, char_traits<pod_char> > str; sstr >> str; + // 2 - pod_char* chr; + pod_char* chr = NULL; sstr >> chr; + // 3 sstr >> ws; } diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/1.cc index c2afc80348c..01426e75259 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/1.cc @@ -32,7 +32,7 @@ void test01() { typedef std::ios::traits_type ctraits_type; - bool test = true; + bool test __attribute__((unused)) = true; const std::string str_01; const std::string str_02("art taylor kickin it on DAKAR"); std::string strtmp; diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/2.cc index 3492a1e1158..2fd1cd03bc4 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/2.cc @@ -30,7 +30,7 @@ // filebufs. void test02() { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::ios::traits_type ctraits_type; const char name_01[] = "istream_extractor_other-1.txt"; //read const char name_02[] = "istream_extractor_other-2.txt"; //write diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/3.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/3.cc index 9182033937d..1e195323197 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/3.cc @@ -30,7 +30,7 @@ void test03() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; // template<_CharT, _Traits> // basic_istream& operator>>(ios_base& (*pf) (ios_base&)) @@ -38,7 +38,6 @@ void test03() int i = 0; std::istringstream iss(" 43"); iss >> std::noskipws >> i; - std::ios::iostate i3 = iss.rdstate(); VERIFY ( !iss ); //should set failbit } diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/9318-in.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/9318-in.cc index 6251a381575..f8110dbf0ee 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/9318-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/9318-in.cc @@ -57,7 +57,7 @@ private: void test09() { - bool test = true; + bool test __attribute__((unused)) = true; std::istringstream stream("Bad Moon Rising"); Outbuf buf; diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/9424-in.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/9424-in.cc index 3c9266b498b..591aac680cb 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/9424-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/9424-in.cc @@ -96,7 +96,7 @@ const char Inbuf_2::buf[] = "Atteivlis"; void test11() { - bool test = true; + bool test __attribute__((unused)) = true; Inbuf_2 inbuf1; std::istream is(&inbuf1); diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/9555-io.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/9555-io.cc index 50ba27c15f8..a5ced0342ef 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/9555-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/9555-io.cc @@ -38,7 +38,7 @@ struct buf: std::streambuf template<typename T> void testthrow(T arg) { - bool test = true; + bool test __attribute__((unused)) = true; buf b; std::istream is(&b); is.exceptions(std::ios::badbit); diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/get/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_istream/get/char/1.cc index 446b6d9c94c..4cc8f35952b 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/get/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/get/char/1.cc @@ -33,7 +33,7 @@ test03() { typedef std::char_traits<char> traits_type; - bool test = true; + bool test __attribute__((unused)) = true; const char str_lit01[] = " sun*ra \n\t\t\t & his arkestra, featuring john gilmore: \n" " " @@ -49,10 +49,9 @@ test03() std::istream is_00(NULL); std::istream is_04(&sbuf_04); std::istream is_05(&sbuf_05); - std::ios_base::iostate state1, state2, statefail, stateeof; + std::ios_base::iostate statefail, stateeof; statefail = std::ios_base::failbit; stateeof = std::ios_base::eofbit; - std::streamsize count1, count2; char carray1[400] = ""; // int_type get() diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/get/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_istream/get/char/2.cc index fa351444fb4..8317e1aee81 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/get/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/get/char/2.cc @@ -34,7 +34,7 @@ void test07() { - bool test = true; + bool test __attribute__((unused)) = true; const char* tfn = "istream_unformatted-1.txt"; std::ifstream infile; infile.open(tfn); diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/getline/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_istream/getline/char/1.cc index 6df68c78460..ccde173c62b 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/getline/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/getline/char/1.cc @@ -33,7 +33,7 @@ test02() { typedef std::char_traits<char> traits_type; - bool test = true; + bool test __attribute__((unused)) = true; const char str_lit01[] = "\t\t\t sun*ra \n" " " "and his myth science arkestra present\n" @@ -51,7 +51,6 @@ test02() std::ios_base::iostate state1, state2, statefail, stateeof; statefail = std::ios_base::failbit; stateeof = std::ios_base::eofbit; - std::streamsize count1, count2; char carray1[400] = ""; // istream& getline(char* s, streamsize n, char delim) diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/getline/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_istream/getline/char/2.cc index 53b14a985f5..543d7cbba47 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/getline/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/getline/char/2.cc @@ -49,7 +49,7 @@ test05() "aaaaaaaaaaaaa\n" "aaaaaaaaaaaaaa\n"; - bool test = true; + bool test __attribute__((unused)) = true; const std::streamsize it = 5; std::streamsize br = 0; char tmp[it]; @@ -89,7 +89,7 @@ test05() // // -> strlen(__s) < n - 1 // -> delimiter was seen -> gcount() > strlen(__s) - VERIFY(ifs.gcount() == std::strlen(tmp) + 1); + VERIFY(ifs.gcount() == static_cast<std::streamsize>(std::strlen(tmp) + 1) ); continue; } } diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/getline/char/3.cc b/libstdc++-v3/testsuite/27_io/basic_istream/getline/char/3.cc index f4627ef7e29..0d640de02b8 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/getline/char/3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/getline/char/3.cc @@ -36,7 +36,7 @@ test06() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; const streamsize it = 5; char tmp[it]; const char* str_lit = "abcd\n"; diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/ignore/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_istream/ignore/char/1.cc index cc6a9a564dc..c0a753e26d7 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/ignore/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/ignore/char/1.cc @@ -33,7 +33,7 @@ test01() { typedef std::ios::traits_type traits_type; - bool test = true; + bool test __attribute__((unused)) = true; const std::string str_01; const std::string str_02("soul eyes: john coltrane quartet"); std::string strtmp; diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/ignore/char/6360.cc b/libstdc++-v3/testsuite/27_io/basic_istream/ignore/char/6360.cc index 8e79620aafe..38c40cea24b 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/ignore/char/6360.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/ignore/char/6360.cc @@ -33,7 +33,7 @@ void test08() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; stringstream ss("abcd" "\xFF" "1234ina donna coolbrith"); char c; diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/ignore/char/7220.cc b/libstdc++-v3/testsuite/27_io/basic_istream/ignore/char/7220.cc index 87ac36ab659..6e0c9151e69 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/ignore/char/7220.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/ignore/char/7220.cc @@ -33,12 +33,11 @@ void test10() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; typedef string string_type; typedef stringbuf stringbuf_type; typedef istream istream_type; - int res = 0; streamsize n; string_type input("abcdefg\n"); stringbuf_type sbuf(input); diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/peek/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_istream/peek/char/1.cc index 53317ede0db..be4b0700d10 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/peek/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/peek/char/1.cc @@ -33,7 +33,7 @@ test01() { typedef std::ios::traits_type traits_type; - bool test = true; + bool test __attribute__((unused)) = true; const std::string str_01; const std::string str_02("soul eyes: john coltrane quartet"); std::string strtmp; diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/peek/char/6414.cc b/libstdc++-v3/testsuite/27_io/basic_istream/peek/char/6414.cc index 4fbd5cc8499..e060ff2716d 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/peek/char/6414.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/peek/char/6414.cc @@ -31,7 +31,7 @@ // fstreams void test04(void) { - bool test = true; + bool test __attribute__((unused)) = true; std::istream::pos_type pos01, pos02, pos03, pos04, pos05, pos06; const char str_lit01[] = "istream_seeks-1.txt"; std::ifstream if01(str_lit01, std::ios_base::in | std::ios_base::out); diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/putback/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_istream/putback/char/1.cc index 0213e3dfac0..47fcd0136f2 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/putback/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/putback/char/1.cc @@ -32,7 +32,7 @@ test01() { typedef std::ios::traits_type traits_type; - bool test = true; + bool test __attribute__((unused)) = true; const std::string str_01; const std::string str_02("soul eyes: john coltrane quartet"); std::string strtmp; @@ -48,8 +48,6 @@ test01() statefail = std::ios_base::failbit; stateeof = std::ios_base::eofbit; - char carray[60] = ""; - // istream& putback(char c) is_04.ignore(30); is_04.clear(); @@ -72,7 +70,7 @@ test01() // int sync() is_00.ignore(10); int count1 = is_00.gcount(); - int i = is_00.sync(); + is_00.sync(); int count2 = is_00.gcount(); VERIFY (count1 == count2 ); // DR 60 } diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/read/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_istream/read/char/1.cc index e79e4a206c0..0ece0a5d596 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/read/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/read/char/1.cc @@ -33,7 +33,7 @@ test01() { typedef std::ios::traits_type traits_type; - bool test = true; + bool test __attribute__((unused)) = true; const std::string str_01; const std::string str_02("soul eyes: john coltrane quartet"); std::string strtmp; diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/read/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_istream/read/char/2.cc index 4133e1a8588..6779c2b7d32 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/read/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/read/char/2.cc @@ -33,7 +33,7 @@ void test04() { - bool test = true; + bool test __attribute__((unused)) = true; const std::string str_00("Red_Garland_Qunitet-Soul_Junction"); std::string strtmp; @@ -41,14 +41,14 @@ test04() std::stringbuf isbuf_00(str_00, std::ios_base::in); std::istream is_00(&isbuf_00); - std::ios_base::iostate state1, state2, statefail, stateeof; + std::ios_base::iostate state1, statefail, stateeof; statefail = std::ios_base::failbit; stateeof = std::ios_base::eofbit; state1 = stateeof | statefail; VERIFY( is_00.gcount() == 0 ); is_00.read(c_array, str_00.size() + 1); - VERIFY( is_00.gcount() == str_00.size() ); + VERIFY( is_00.gcount() == static_cast<std::streamsize>(str_00.size()) ); VERIFY( is_00.rdstate() == state1 ); is_00.read(c_array, str_00.size()); diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/read/char/3.cc b/libstdc++-v3/testsuite/27_io/basic_istream/read/char/3.cc index 3c418e943b0..b66f730ed01 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/read/char/3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/read/char/3.cc @@ -33,7 +33,7 @@ void test09() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; istringstream iss("Juana Briones"); char tab[13]; diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/readsome/char/6746-1.cc b/libstdc++-v3/testsuite/27_io/basic_istream/readsome/char/6746-1.cc index f0109b0a661..6a42fd32cfb 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/readsome/char/6746-1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/readsome/char/6746-1.cc @@ -32,7 +32,7 @@ void test12() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; streamsize sum = 0; istringstream iss("shamma shamma"); diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/readsome/char/6746-2.cc b/libstdc++-v3/testsuite/27_io/basic_istream/readsome/char/6746-2.cc index 6d87a2959a3..bf25632f967 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/readsome/char/6746-2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/readsome/char/6746-2.cc @@ -32,7 +32,7 @@ void test13() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; streamsize sum = 0; ifstream ifs("istream_unformatted-1.tst"); diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/readsome/char/8258.cc b/libstdc++-v3/testsuite/27_io/basic_istream/readsome/char/8258.cc index fdb412ca125..67596719dc3 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/readsome/char/8258.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/readsome/char/8258.cc @@ -34,7 +34,7 @@ class mybuf : public std::basic_streambuf<char> void test11() { - bool test = true; + bool test __attribute__((unused)) = true; using namespace std; char arr[10]; mybuf sbuf; diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/2.cc index 04078dbafeb..e20854c3f82 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/2.cc @@ -28,7 +28,7 @@ void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; istringstream ist("the lamb lies down on broadway"); ios::pos_type pos = ist.tellg(); diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/2346-fstream.cc b/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/2346-fstream.cc index 4c4b25c57b4..af2b81668b5 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/2346-fstream.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/2346-fstream.cc @@ -35,7 +35,7 @@ void write_rewind(std::iostream& stream) { for (int j = 0; j < times; j++) { - bool test = true; + bool test __attribute__((unused)) = true; std::streampos begin = stream.tellg(); for (int i = 0; i < times; ++i) @@ -49,7 +49,7 @@ void write_rewind(std::iostream& stream) void check_contents(std::iostream& stream) { - bool test = true; + bool test __attribute__((unused)) = true; stream.clear(); stream.seekg(0, std::ios::beg); diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/2346-sstream.cc b/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/2346-sstream.cc index ab35ddba34f..6a8f5d72c0d 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/2346-sstream.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/2346-sstream.cc @@ -35,7 +35,7 @@ void write_rewind(std::iostream& stream) { for (int j = 0; j < times; j++) { - bool test = true; + bool test __attribute__((unused)) = true; std::streampos begin = stream.tellg(); for (int i = 0; i < times; ++i) @@ -49,7 +49,7 @@ void write_rewind(std::iostream& stream) void check_contents(std::iostream& stream) { - bool test = true; + bool test __attribute__((unused)) = true; stream.clear(); stream.seekg(0, std::ios::beg); diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/8348-1.cc b/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/8348-1.cc index 823e237930a..273855a0b64 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/8348-1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/8348-1.cc @@ -32,7 +32,7 @@ void test06(void) { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; string num1("555"); // seekg diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/8348-2.cc b/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/8348-2.cc index aeed5325134..233773193ee 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/8348-2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/8348-2.cc @@ -32,7 +32,7 @@ void test06(void) { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; string num1("555"); // seekg diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/fstream.cc b/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/fstream.cc index 27dca74fa5d..00df7cfac89 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/fstream.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/fstream.cc @@ -33,7 +33,7 @@ void test04(void) { typedef std::istream::off_type off_type; - bool test = true; + bool test __attribute__((unused)) = true; std::istream::pos_type pos01, pos02, pos03, pos04, pos05, pos06; std::ios_base::iostate state01, state02; const char str_lit01[] = "istream_seeks-1.txt"; diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/sstream.cc b/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/sstream.cc index cf1455fa0d4..286d3a23eca 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/sstream.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/sstream.cc @@ -33,7 +33,7 @@ void test05(void) { typedef std::istream::off_type off_type; - bool test = true; + bool test __attribute__((unused)) = true; std::istream::pos_type pos01, pos02, pos03, pos04, pos05, pos06; std::ios_base::iostate state01, state02; const char str_lit01[] = "istream_seeks-1.tst"; diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/1.cc index 1bc58ad20e7..61db9001211 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/1.cc @@ -35,7 +35,7 @@ void test01() { - bool test = true; + bool test __attribute__((unused)) = true; const char* lit01 = "stereolab on the bolsinga tip"; const std::string str01(lit01); diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/2.cc index 1e42d18ed83..4a25cd5a520 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/2.cc @@ -39,7 +39,7 @@ test02() { using namespace std; istringstream in("80.21 56.89 12.3"); - bool test = true; + bool test __attribute__((unused)) = true; int i = 0; double x; diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/3.cc b/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/3.cc index 9f9e06a03d1..527f3920aa8 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/3.cc @@ -37,7 +37,7 @@ void test03() { - bool test = true; + bool test __attribute__((unused)) = true; std::stringbuf strbuf01; std::istream strm1(&strbuf01); diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/3983-fstream.cc b/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/3983-fstream.cc index 27e1e3667ff..e9e302bf7ee 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/3983-fstream.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/3983-fstream.cc @@ -125,7 +125,7 @@ namespace std void test03() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; // input streams basic_ifstream<unsigned char> ifs_uc; diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/3983-sstream.cc b/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/3983-sstream.cc index 4e928fad62b..77bf598ec89 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/3983-sstream.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/3983-sstream.cc @@ -125,7 +125,7 @@ namespace std void test03() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; // input streams basic_istringstream<unsigned char> iss_uc; diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/1.cc index 6ec4d69f3fc..d213d040a11 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/1.cc @@ -33,7 +33,7 @@ void test01() using namespace std; typedef ios::pos_type pos_type; - bool test = true; + bool test __attribute__((unused)) = true; const char str_lit01[] = "istream_seeks-1.tst"; // in diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/2.cc index b9af611c044..1afd1a0745c 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/2.cc @@ -28,7 +28,7 @@ void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; istringstream ist("three sides live"); ist.ignore(4); diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/8348.cc b/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/8348.cc index 771d25bfe9a..2cb9ea7fe93 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/8348.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/8348.cc @@ -32,7 +32,7 @@ void test06(void) { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; string num1("555"); // tellg diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/fstream.cc b/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/fstream.cc index d9d2f02dbb9..dffa89872df 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/fstream.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/fstream.cc @@ -33,7 +33,7 @@ void test04(void) { typedef std::istream::off_type off_type; - bool test = true; + bool test __attribute__((unused)) = true; std::istream::pos_type pos01, pos02, pos03, pos04, pos05, pos06; std::ios_base::iostate state01, state02; const char str_lit01[] = "istream_seeks-1.txt"; diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/sstream.cc b/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/sstream.cc index abc99f8bd6b..4d9e3a9d880 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/sstream.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/sstream.cc @@ -33,7 +33,7 @@ void test05(void) { typedef std::istream::off_type off_type; - bool test = true; + bool test __attribute__((unused)) = true; std::istream::pos_type pos01, pos02, pos03, pos04, pos05, pos06; std::ios_base::iostate state01, state02; const char str_lit01[] = "istream_seeks-1.tst"; diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/ws/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_istream/ws/char/1.cc index 3761e948617..00f5798ef5a 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/ws/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/ws/char/1.cc @@ -27,14 +27,14 @@ void test01(void) { - bool test = true; + bool test __attribute__((unused)) = true; const char str_lit01[] = " venice "; const std::string str01(" santa barbara "); std::string str02(str_lit01); std::string str04; std::string str05; - std::ios_base::iostate flag1, flag2, flag3, flag4, flag5; + std::ios_base::iostate flag3, flag4, flag5; // template<_CharT, _Traits> // basic_istream<_CharT, _Traits>& ws(basic_istream<_Char, _Traits>& is) diff --git a/libstdc++-v3/testsuite/27_io/basic_istringstream/3.cc b/libstdc++-v3/testsuite/27_io/basic_istringstream/3.cc index 0b051e97200..8bdbfc6f655 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istringstream/3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istringstream/3.cc @@ -59,7 +59,7 @@ struct gnu_char_traits typedef gnu_char_type char_type; typedef long int_type; typedef long pos_type; - typedef unsigned long off_type; + typedef long off_type; typedef long state_type; static void @@ -117,7 +117,7 @@ struct gnu_char_traits void test07() { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::basic_istringstream<gnu_char_type, gnu_char_traits> gnu_isstr; try diff --git a/libstdc++-v3/testsuite/27_io/basic_istringstream/4.cc b/libstdc++-v3/testsuite/27_io/basic_istringstream/4.cc index 764dd1404f4..4d212dac749 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istringstream/4.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istringstream/4.cc @@ -29,7 +29,7 @@ void test01() typedef std::istringstream test_type; typedef std::istream base_type; const test_type& obj = test_type(); - const base_type* base = &obj; + const base_type* base __attribute__((unused)) = &obj; } int main() diff --git a/libstdc++-v3/testsuite/27_io/basic_istringstream/rdbuf/char/2832.cc b/libstdc++-v3/testsuite/27_io/basic_istringstream/rdbuf/char/2832.cc index 59b601eef03..7e30ccd3429 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istringstream/rdbuf/char/2832.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istringstream/rdbuf/char/2832.cc @@ -34,9 +34,8 @@ active_buffer(std::ios& stream) // libstdc++/2832 void test02() { - bool test = true; + bool test __attribute__((unused)) = true; const char* strlit01 = "fuck war"; - const char* strlit02 = "two less cars abstract riot crew, critical mass/SF"; const std::string str00; const std::string str01(strlit01); std::string str02; diff --git a/libstdc++-v3/testsuite/27_io/basic_istringstream/str/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_istringstream/str/char/1.cc index 32acd5b183c..509386e2a11 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istringstream/str/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istringstream/str/char/1.cc @@ -25,7 +25,7 @@ void test01() { - bool test = true; + bool test __attribute__((unused)) = true; std::istringstream is01; const std::string str00; const std::string str01 = "123"; diff --git a/libstdc++-v3/testsuite/27_io/basic_ofstream/3.cc b/libstdc++-v3/testsuite/27_io/basic_ofstream/3.cc index 3bba780a4c6..3cba2191ced 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ofstream/3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ofstream/3.cc @@ -117,7 +117,7 @@ struct gnu_char_traits void test07() { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::basic_ofstream<gnu_char_type, gnu_char_traits> gnu_ofstr; try diff --git a/libstdc++-v3/testsuite/27_io/basic_ofstream/4.cc b/libstdc++-v3/testsuite/27_io/basic_ofstream/4.cc index 9d58396d193..47d7c928f89 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ofstream/4.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ofstream/4.cc @@ -29,7 +29,7 @@ void test01() typedef std::ofstream test_type; typedef std::ostream base_type; const test_type& obj = test_type(); - const base_type* base = &obj; + const base_type* base __attribute__((unused)) = &obj; } int main() diff --git a/libstdc++-v3/testsuite/27_io/basic_ofstream/cons/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_ofstream/cons/char/2.cc index 14e217ec9c0..accf3e51c1f 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ofstream/cons/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ofstream/cons/char/2.cc @@ -29,7 +29,7 @@ const char name_02[] = "ofstream_members-1.txt"; // http://gcc.gnu.org/ml/libstdc++/2000-07/msg00004.html void test02() { - bool test = true; + bool test __attribute__((unused)) = true; const int more_than_max_open_files = 8200; for(int i = 0; ++i < more_than_max_open_files;) diff --git a/libstdc++-v3/testsuite/27_io/basic_ofstream/open/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ofstream/open/char/1.cc index f97eec10454..5bb02d4eb3c 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ofstream/open/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ofstream/open/char/1.cc @@ -30,7 +30,7 @@ const char name_02[] = "ofstream_members-1.txt"; // http://gcc.gnu.org/ml/libstdc++/2000-06/msg00136.html void test01() { - bool test = true; + bool test __attribute__((unused)) = true; std::ofstream ofs1; ofs1.close(); diff --git a/libstdc++-v3/testsuite/27_io/basic_ofstream/rdbuf/char/2832.cc b/libstdc++-v3/testsuite/27_io/basic_ofstream/rdbuf/char/2832.cc index 7e897efdfaf..9ca7b900dd6 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ofstream/rdbuf/char/2832.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ofstream/rdbuf/char/2832.cc @@ -37,9 +37,8 @@ active_buffer(std::ios& stream) // libstdc++/2832 void test03() { - bool test = true; + bool test __attribute__((unused)) = true; const char* strlit01 = "fuck war"; - const char* strlit02 = "two less cars abstract riot crew, critical mass/SF"; const std::string str00; const std::string str01(strlit01); std::string str02; diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/3.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/3.cc index 09eb94c8b1b..7ec77fb16c5 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/3.cc @@ -117,7 +117,7 @@ struct gnu_char_traits void test07() { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::basic_ostream<gnu_char_type, gnu_char_traits> gnu_ostr; try diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/4.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/4.cc index b1b669c942f..c945539a3b7 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/4.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/4.cc @@ -31,7 +31,7 @@ void test01() std::stringbuf buf; const test_type& obj = test_type(&buf); - const base_type* base = &obj; + const base_type* base __attribute__((unused)) = &obj; } int main() diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/cons/char/9827.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/cons/char/9827.cc index 7a4f26396d8..309d6f09ba1 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/cons/char/9827.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/cons/char/9827.cc @@ -30,7 +30,7 @@ class Buf : public std::streambuf void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; Buf buf; ostream stream(&buf); diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/endl/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/endl/char/1.cc index 8e69c421dd1..6c866ff83ba 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/endl/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/endl/char/1.cc @@ -27,18 +27,16 @@ void test01(void) { - bool test = true; + bool test __attribute__((unused)) = true; const char str_lit01[] = " venice "; const std::string str01(" santa barbara "); std::string str02(str_lit01); std::string str04; std::string str05; - std::ios_base::iostate flag1, flag2, flag3, flag4, flag5; std::ostringstream oss01(str01); std::ostringstream oss02; - std::ostringstream::int_type i01, i02; typedef std::ostringstream::traits_type traits_type; // template<_CharT, _Traits> diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/ends/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/ends/char/1.cc index a3c11791737..3725fd8f00e 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/ends/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/ends/char/1.cc @@ -28,18 +28,16 @@ void test01(void) { - bool test = true; + bool test __attribute__((unused)) = true; const char str_lit01[] = " venice "; const std::string str01(" santa barbara "); std::string str02(str_lit01); std::string str04; std::string str05; - std::ios_base::iostate flag1, flag2, flag3, flag4, flag5; std::ostringstream oss01(str01); std::ostringstream oss02; - std::ostringstream::int_type i01, i02; typedef std::ostringstream::traits_type traits_type; // template<_CharT, _Traits> diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/ends/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/ends/char/2.cc index 34de949e4bb..fb5f8ccaaff 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/ends/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/ends/char/2.cc @@ -32,12 +32,12 @@ void test02() using namespace std; typedef ostringstream::int_type int_type; - bool test = true; + bool test __attribute__((unused)) = true; ostringstream osst_01; const string str_00("herbie_hancock"); int_type len1 = str_00.size(); osst_01 << str_00; - VERIFY( osst_01.str().size() == len1 ); + VERIFY( static_cast<int_type>(osst_01.str().size()) == len1 ); osst_01 << ends; diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/exceptions/char/9561.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/exceptions/char/9561.cc index 3e3726cd398..a1746fbc797 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/exceptions/char/9561.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/exceptions/char/9561.cc @@ -36,7 +36,7 @@ struct buf: std::streambuf void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; buf b; std::ostream strm (&b); diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/flush/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/flush/char/1.cc index 3d9098f53d1..2b05fd8f1f7 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/flush/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/flush/char/1.cc @@ -27,18 +27,16 @@ void test01(void) { - bool test = true; + bool test __attribute__((unused)) = true; const char str_lit01[] = " venice "; const std::string str01(" santa barbara "); std::string str02(str_lit01); std::string str04; std::string str05; - std::ios_base::iostate flag1, flag2, flag3, flag4, flag5; std::ostringstream oss01(str01); std::ostringstream oss02; - std::ostringstream::int_type i01, i02; typedef std::ostringstream::traits_type traits_type; // template<_CharT, _Traits> diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/1.cc index f49f60405f8..8b8da8a1e80 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/1.cc @@ -150,8 +150,8 @@ void apply_formatting(const _TestCase & tc, basic_ostream<_CharT> & os) void test01() { - bool test = true; - for (int j=0; j<sizeof(testcases)/sizeof(testcases[0]); j++) + bool test __attribute__((unused)) = true; + for (std::size_t j = 0; j<sizeof(testcases)/sizeof(testcases[0]); j++) { _TestCase & tc = testcases[j]; #ifdef TEST_NUMPUT_VERBOSE diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc index 2cf4021108f..c1d41ca35ac 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc @@ -32,7 +32,7 @@ using namespace std; void test02() { - bool test = true; + bool test __attribute__((unused)) = true; // Make sure we can output a long float in fixed format // without seg-faulting (libstdc++/4402) diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/3.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/3.cc index d26463b525d..fed2696cc1b 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/3.cc @@ -32,7 +32,7 @@ test03_check(T n) stringbuf strbuf; ostream o(&strbuf); const char *expect; - bool test = true; + bool test __attribute__((unused)) = true; if (numeric_limits<T>::digits + 1 == 16) expect = "177777 ffff"; diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/4.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/4.cc index 445f884a6ae..304fc40c11f 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/4.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/4.cc @@ -31,7 +31,7 @@ test04() { stringbuf strbuf1, strbuf2; ostream o1(&strbuf1), o2(&strbuf2); - bool test = true; + bool test __attribute__((unused)) = true; o1 << hex << showbase << setw(6) << internal << 0xff; VERIFY( strbuf1.str() == "0x ff" ); diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/4402.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/4402.cc index 67eeecc2b6e..1d17b205717 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/4402.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/4402.cc @@ -31,7 +31,7 @@ using namespace std; void test02() { - bool test = true; + bool test __attribute__((unused)) = true; // make sure we can output a very long float long double val = 1.2345678901234567890123456789e+1000L; int prec = numeric_limits<long double>::digits10; diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/5.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/5.cc index 647f8714629..ce521e235d4 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/5.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/5.cc @@ -30,7 +30,7 @@ using namespace std; void test05() { - bool test = true; + bool test __attribute__((unused)) = true; double pi = 3.14159265358979323846; ostringstream ostr; ostr.precision(20); diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/6.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/6.cc index d3f0499c3bb..36b67f2a0ba 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/6.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/6.cc @@ -31,7 +31,7 @@ using namespace std; int test06() { - bool test = true; + bool test __attribute__((unused)) = true; int prec = numeric_limits<double>::digits10 + 2; double oval = numeric_limits<double>::min(); diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/9555-oa.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/9555-oa.cc index caf716061d9..a63710d6956 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/9555-oa.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/9555-oa.cc @@ -38,7 +38,7 @@ struct buf: std::streambuf template<typename T> void testthrow(T arg) { - bool test = true; + bool test __attribute__((unused)) = true; buf b; std::ostream os(&b); os.exceptions(std::ios::badbit); diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/1.cc index 484e66b8c15..0f8848b4008 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/1.cc @@ -151,8 +151,8 @@ void apply_formatting(const _TestCase & tc, basic_ostream<_CharT> & os) void test01() { - bool test = true; - for (int j=0; j<sizeof(testcases)/sizeof(testcases[0]); j++) + bool test __attribute__((unused)) = true; + for (std::size_t j = 0; j<sizeof(testcases)/sizeof(testcases[0]); j++) { _TestCase & tc = testcases[j]; #ifdef TEST_NUMPUT_VERBOSE diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/11095-oa.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/11095-oa.cc index d9158f534f0..856b955f2ef 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/11095-oa.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/11095-oa.cc @@ -29,7 +29,7 @@ void test01() { - bool test = true; + bool test __attribute__((unused)) = true; std::ostringstream oss_01; diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/11095-ob.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/11095-ob.cc index f208723de8a..e2f9861b9ea 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/11095-ob.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/11095-ob.cc @@ -29,7 +29,7 @@ void test02() { - bool test = true; + bool test __attribute__((unused)) = true; std::ostringstream oss_01; diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/11095-oc.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/11095-oc.cc index 204089df14f..4c8de7c625f 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/11095-oc.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/11095-oc.cc @@ -29,7 +29,7 @@ void test03() { - bool test = true; + bool test __attribute__((unused)) = true; std::ostringstream oss_01; diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/2.cc index 9ffc492586e..1fdbe376ae2 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/2.cc @@ -31,7 +31,7 @@ void test02(void) { - bool test = true; + bool test __attribute__((unused)) = true; std::string tmp; std::string str01 = ""; diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/3.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/3.cc index 5b95862b2b9..fedab18c053 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/3.cc @@ -30,7 +30,7 @@ // right void test03(void) { - bool test = true; + bool test __attribute__((unused)) = true; std::string tmp; std::string str01 = ""; diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/4.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/4.cc index 52d92ecb2eb..e10380c8331 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/4.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/4.cc @@ -30,7 +30,7 @@ void test04() { - bool test = true; + bool test __attribute__((unused)) = true; std::string str_01; const std::string str_02("coltrane playing 'softly as a morning sunrise'"); const std::string str_03("coltrane"); @@ -40,7 +40,7 @@ test04() std::ostringstream oss_01(std::ios_base::out); std::ostringstream oss_02(str_01, std::ios_base::out); - std::ios_base::iostate state1, state2, statefail; + std::ios_base::iostate statefail; statefail = std::ios_base::failbit; // template<_CharT, _Traits> diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/5.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/5.cc index c68f227bfc2..a4e14534457 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/5.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/5.cc @@ -30,7 +30,7 @@ void test05() { - bool test = true; + bool test __attribute__((unused)) = true; std::string str05, str10; typedef std::ostream::pos_type pos_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/6.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/6.cc index a73329c819c..72393d7356b 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/6.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/6.cc @@ -30,7 +30,7 @@ // http://gcc.gnu.org/ml/libstdc++/2000-q1/msg00326.html void test06() { - bool test = true; + bool test __attribute__((unused)) = true; const char carray01[] = "mos def & talib kweli are black star"; // normal diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/8.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/8.cc index 244ee752919..c4dc96cf19a 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/8.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/8.cc @@ -28,7 +28,7 @@ void test08() { - bool test = true; + bool test __attribute__((unused)) = true; char* pt = NULL; // 1 diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/9555-oc.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/9555-oc.cc index f1e24f35bd2..2e932753fdb 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/9555-oc.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/9555-oc.cc @@ -38,7 +38,7 @@ struct buf: std::streambuf template<typename T> void testthrow(T arg) { - bool test = true; + bool test __attribute__((unused)) = true; buf b; std::ostream os(&b); os.exceptions(std::ios::badbit); diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/11095-od.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/11095-od.cc index bd4d1840fd7..0c38d4ea5d7 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/11095-od.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/11095-od.cc @@ -29,7 +29,7 @@ void test01() { - bool test = true; + bool test __attribute__((unused)) = true; std::wostringstream oss_01; diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/11095-oe.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/11095-oe.cc index 4be5d86feb9..f93fe260c35 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/11095-oe.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/11095-oe.cc @@ -29,7 +29,7 @@ void test02() { - bool test = true; + bool test __attribute__((unused)) = true; std::wostringstream oss_01; diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/11095-of.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/11095-of.cc index 34695a4314f..76d20ceb1b3 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/11095-of.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/11095-of.cc @@ -29,7 +29,7 @@ void test03() { - bool test = true; + bool test __attribute__((unused)) = true; std::wostringstream oss_01; diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/7.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/7.cc index 6344dd4d5a0..722ec06e8ae 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/7.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/7.cc @@ -52,7 +52,7 @@ protected: void test07() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; const char* buffer = "SFPL 5th floor, outside carrol, the Asian side"; diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/8.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/8.cc index bf4480db26e..8b2c9d8c185 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/8.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/8.cc @@ -28,7 +28,7 @@ void test08() { - bool test = true; + bool test __attribute__((unused)) = true; char* pt = NULL; // 2 diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/1.cc index 3fa9e68fe56..00fef8ac37a 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/1.cc @@ -39,7 +39,7 @@ void test02() { typedef std::ios_base::iostate iostate; - bool test = true; + bool test __attribute__((unused)) = true; // basic_ostream<_CharT, _Traits>::operator<<(__streambuf_type* __sb) // filebuf-> NULL diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/3.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/3.cc index 89dca57cd54..5f054fb8cd7 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/3.cc @@ -31,7 +31,7 @@ void test04() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; istringstream istr("inside betty carter"); ostringstream ostr; ostr << istr.rdbuf() << endl; diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/4.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/4.cc index 1ba200aaca7..949448e8372 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/4.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/4.cc @@ -101,7 +101,7 @@ private: void test(const std::string& str, std::streambuf& buf) { - bool test = true; + bool test __attribute__((unused)) = true; std::ostringstream out; std::istream in(&buf); diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/9318-out.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/9318-out.cc index fcacbcb6483..d495e01bf15 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/9318-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/9318-out.cc @@ -56,7 +56,7 @@ private: void test10() { - bool test = true; + bool test __attribute__((unused)) = true; std::stringbuf sbuf("Bad Moon Rising", std::ios::in); Outbuf buf; diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/9424-out.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/9424-out.cc index 61ec1a71eaf..5824caa7dd1 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/9424-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/9424-out.cc @@ -96,7 +96,7 @@ const char Inbuf_2::buf[] = "Atteivlis"; void test12() { - bool test = true; + bool test __attribute__((unused)) = true; Outbuf_2 outbuf2; std::ostream os (&outbuf2); diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/9555-oo.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/9555-oo.cc index 42ad89cbd1d..6b02aeb1903 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/9555-oo.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/9555-oo.cc @@ -38,7 +38,7 @@ struct buf: std::streambuf template<typename T> void testthrow(T arg) { - bool test = true; + bool test __attribute__((unused)) = true; buf b; std::ostream os(&b); os.exceptions(std::ios::badbit); diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/1.cc index cba75f250fa..40cfdb72615 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/1.cc @@ -37,7 +37,7 @@ void test01() { - bool test = true; + bool test __attribute__((unused)) = true; std::stringbuf strbuf01; std::ostream strm1(&strbuf01); diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/2.cc index 4e7562cfd12..72ba932efe6 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/2.cc @@ -50,7 +50,7 @@ struct buf: std::streambuf void test02() { - bool test = true; + bool test __attribute__((unused)) = true; buf b(0); std::ostream strm(&b); diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/3983-fstream.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/3983-fstream.cc index 2c8f6c67463..e3af42e3b62 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/3983-fstream.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/3983-fstream.cc @@ -125,7 +125,7 @@ namespace std void test03() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; // output streams basic_ofstream<unsigned char> ofs_uc; diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/3983-sstream.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/3983-sstream.cc index 141548ad10a..fe1a9473c2c 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/3983-sstream.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/3983-sstream.cc @@ -125,7 +125,7 @@ namespace std void test03() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; // output streams basic_ostringstream<unsigned char> oss_uc; diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/tellp/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/tellp/char/1.cc index 05884fc123d..5c8caced6f3 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/tellp/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/tellp/char/1.cc @@ -31,7 +31,7 @@ void test01() using namespace std; typedef ios::pos_type pos_type; - bool test = true; + bool test __attribute__((unused)) = true; const char str_lit01[] = "ostream_seeks-1.txt"; // out diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/tellp/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/tellp/char/2.cc index e278daec21a..f82df5d4bb0 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/tellp/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/tellp/char/2.cc @@ -27,7 +27,7 @@ void test01() using namespace std; typedef std::stringbuf::pos_type pos_type; typedef std::stringbuf::off_type off_type; - bool test = true; + bool test __attribute__((unused)) = true; // tellp ostringstream ost; diff --git a/libstdc++-v3/testsuite/27_io/basic_ostringstream/3.cc b/libstdc++-v3/testsuite/27_io/basic_ostringstream/3.cc index f7e96885ea3..8593d6e6f60 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostringstream/3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostringstream/3.cc @@ -59,7 +59,7 @@ struct gnu_char_traits typedef gnu_char_type char_type; typedef long int_type; typedef long pos_type; - typedef unsigned long off_type; + typedef long off_type; typedef long state_type; static void @@ -117,7 +117,7 @@ struct gnu_char_traits void test07() { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::basic_ostringstream<gnu_char_type, gnu_char_traits> gnu_osstr; try diff --git a/libstdc++-v3/testsuite/27_io/basic_ostringstream/4.cc b/libstdc++-v3/testsuite/27_io/basic_ostringstream/4.cc index 48c56383e4c..aafd2bcd6cd 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostringstream/4.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostringstream/4.cc @@ -29,7 +29,7 @@ void test01() typedef std::ostringstream test_type; typedef std::ostream base_type; const test_type& obj = test_type(); - const base_type* base = &obj; + const base_type* base __attribute__((unused)) = &obj; } int main() diff --git a/libstdc++-v3/testsuite/27_io/basic_ostringstream/cons/char/3.cc b/libstdc++-v3/testsuite/27_io/basic_ostringstream/cons/char/3.cc index 3edad1a5080..37b5da23267 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostringstream/cons/char/3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostringstream/cons/char/3.cc @@ -27,7 +27,7 @@ void test03() { - bool test = false; + bool test __attribute__((unused)) = false; // Empty string sanity check. std::string str01; diff --git a/libstdc++-v3/testsuite/27_io/basic_ostringstream/rdbuf/char/2832.cc b/libstdc++-v3/testsuite/27_io/basic_ostringstream/rdbuf/char/2832.cc index 8019bba06f2..826ee5ac26b 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostringstream/rdbuf/char/2832.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostringstream/rdbuf/char/2832.cc @@ -34,9 +34,8 @@ active_buffer(std::ios& stream) // libstdc++/2832 void test02() { - bool test = true; + bool test __attribute__((unused)) = true; const char* strlit01 = "fuck war"; - const char* strlit02 = "two less cars abstract riot crew, critical mass/SF"; const std::string str00; const std::string str01(strlit01); std::string str02; diff --git a/libstdc++-v3/testsuite/27_io/basic_ostringstream/str/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ostringstream/str/char/1.cc index 7a3b758ae72..db3f57860b1 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostringstream/str/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostringstream/str/char/1.cc @@ -25,15 +25,13 @@ void test01() { - bool test = true; + bool test __attribute__((unused)) = true; std::ostringstream os01; const std::string str00; const std::string str01 = "123"; std::string str02; - const int i01 = 123; - int a,b; - std::ios_base::iostate state1, state2, statefail, stateeof; + std::ios_base::iostate statefail, stateeof; statefail = std::ios_base::failbit; stateeof = std::ios_base::eofbit; diff --git a/libstdc++-v3/testsuite/27_io/basic_ostringstream/str/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_ostringstream/str/char/2.cc index 310b298152b..b9564ec9dc0 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostringstream/str/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostringstream/str/char/2.cc @@ -33,7 +33,7 @@ public: void test04() { - bool test = true; + bool test __attribute__((unused)) = true; derived_oss yy; yy << "buena vista social club\n"; VERIFY( yy.str() == std::string("buena vista social club\n") ); diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/3.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/3.cc index c599985d43f..318ff033ef7 100644 --- a/libstdc++-v3/testsuite/27_io/basic_streambuf/3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/3.cc @@ -118,7 +118,7 @@ class gnu_sbuf: public std::basic_streambuf<gnu_char_type, gnu_char_traits> void test07() { - bool test = true; + bool test __attribute__((unused)) = true; try { gnu_sbuf obj; } diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/cons/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/cons/char/1.cc index c48ecbcc43d..9400a599bfc 100644 --- a/libstdc++-v3/testsuite/27_io/basic_streambuf/cons/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/cons/char/1.cc @@ -46,7 +46,7 @@ public: bool check_pointers() { - bool test = true; + bool test __attribute__((unused)) = true; VERIFY( this->eback() == NULL ); VERIFY( this->gptr() == NULL ); VERIFY( this->egptr() == NULL ); @@ -92,8 +92,7 @@ void test01() typedef testbuf::traits_type traits_type; typedef testbuf::int_type int_type; - bool test = true; - char* lit01 = "chicago underground trio/possible cube on delmark"; + bool test __attribute__((unused)) = true; testbuf buf01; // 27.5.2.1 basic_streambuf ctors diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/imbue/char/9322.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/imbue/char/9322.cc index 7dbfdc75562..17d94af7001 100644 --- a/libstdc++-v3/testsuite/27_io/basic_streambuf/imbue/char/9322.cc +++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/imbue/char/9322.cc @@ -47,7 +47,7 @@ public: void test08() { using std::locale; - bool test = true; + bool test __attribute__((unused)) = true; locale loc; testbuf ob; diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/in_avail/char/9701-3.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/in_avail/char/9701-3.cc index 4f98839d907..5dc68c62b9a 100644 --- a/libstdc++-v3/testsuite/27_io/basic_streambuf/in_avail/char/9701-3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/in_avail/char/9701-3.cc @@ -35,7 +35,7 @@ public: void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; const char* name = "tmp_file1"; Derived_fbuf df2; diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/overflow/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/overflow/char/1.cc index 2a3a4be1a25..d2a42effc6b 100644 --- a/libstdc++-v3/testsuite/27_io/basic_streambuf/overflow/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/overflow/char/1.cc @@ -46,7 +46,7 @@ public: bool check_pointers() { - bool test = true; + bool test __attribute__((unused)) = true; VERIFY( this->eback() == NULL ); VERIFY( this->gptr() == NULL ); VERIFY( this->egptr() == NULL ); @@ -92,8 +92,9 @@ void test01() typedef testbuf::traits_type traits_type; typedef testbuf::int_type int_type; - bool test = true; - char* lit01 = "chicago underground trio/possible cube on delmark"; + bool test __attribute__((unused)) = true; + char lit01[52]; + strcpy(lit01, "chicago underground trio/possible cube on delmark"); testbuf buf01; // pbackfail diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/overflow/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/overflow/char/2.cc index dcee654b213..a6215529251 100644 --- a/libstdc++-v3/testsuite/27_io/basic_streambuf/overflow/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/overflow/char/2.cc @@ -60,7 +60,7 @@ template<typename T> void test03() { - bool test = true; + bool test __attribute__((unused)) = true; const std::string control01("11111"); std::string test01; diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/overflow/char/3599.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/overflow/char/3599.cc index 1b6cf0cf332..145e4eb3ec6 100644 --- a/libstdc++-v3/testsuite/27_io/basic_streambuf/overflow/char/3599.cc +++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/overflow/char/3599.cc @@ -43,14 +43,14 @@ public: protected: int_type - overflow(int_type c = traits_type::eof()) + overflow(int_type c __attribute__((unused)) = traits_type::eof()) { return traits_type::not_eof(0); } }; void test07() { - bool test = true; + bool test __attribute__((unused)) = true; testbuf ob; std::ostream out(&ob); diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetc/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetc/char/1.cc index d2833831e72..72a67de7135 100644 --- a/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetc/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetc/char/1.cc @@ -46,7 +46,7 @@ public: bool check_pointers() { - bool test = true; + bool test __attribute__((unused)) = true; VERIFY( this->eback() == NULL ); VERIFY( this->gptr() == NULL ); VERIFY( this->egptr() == NULL ); @@ -92,8 +92,9 @@ void test01() typedef testbuf::traits_type traits_type; typedef testbuf::int_type int_type; - bool test = true; - char* lit01 = "chicago underground trio/possible cube on delmark"; + bool test __attribute__((unused)) = true; + char lit01[52]; + strcpy(lit01, "chicago underground trio/possible cube on delmark"); testbuf buf01; // 27.5.2.3.1 get area diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetn/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetn/char/1.cc index f1392dc631d..f4c67c8389c 100644 --- a/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetn/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetn/char/1.cc @@ -46,7 +46,7 @@ public: bool check_pointers() { - bool test = true; + bool test __attribute__((unused)) = true; VERIFY( this->eback() == NULL ); VERIFY( this->gptr() == NULL ); VERIFY( this->egptr() == NULL ); @@ -92,8 +92,13 @@ void test02() typedef testbuf::traits_type traits_type; typedef testbuf::int_type int_type; - bool test = true; - char* lit01 = "chicago underground trio/possible cube on delmark"; + bool test __attribute__((unused)) = true; + + const char* lit00 = "chicago underground trio/possible cube on delmark"; + size_t i01 = traits_type::length(lit00); + char lit01[i01]; + strcpy(lit01, lit00); + testbuf buf01; // 27.5.2.1 basic_streambuf ctors @@ -104,7 +109,7 @@ void test02() VERIFY( buf01.getloc() == std::locale() ); // 27.5.2.2.5 Put area - size_t i01 = traits_type::length(lit01); + char carray01[i01]; std::memset(carray01, 0, i01); diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/sputbackc/char/9538.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/sputbackc/char/9538.cc index b90e3d50858..e9c6e2aa6a6 100644 --- a/libstdc++-v3/testsuite/27_io/basic_streambuf/sputbackc/char/9538.cc +++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/sputbackc/char/9538.cc @@ -29,7 +29,7 @@ class MyTraits : public std::char_traits<char> public: static bool eq(char c1, char c2) { - bool test = true; + bool test __attribute__((unused)) = true; VERIFY( c1 != 'X' ); VERIFY( c2 != 'X' ); return std::char_traits<char>::eq(c1, c2); @@ -52,13 +52,13 @@ public: // libstdc++/9538 void test08() { - bool test = true; + bool test __attribute__((unused)) = true; MyBuf mb; mb.sputbackc('a'); } -main() +int main() { test08(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/sputn/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/sputn/char/1.cc index 0feabcd08cd..7859b3f3029 100644 --- a/libstdc++-v3/testsuite/27_io/basic_streambuf/sputn/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/sputn/char/1.cc @@ -46,7 +46,7 @@ public: bool check_pointers() { - bool test = true; + bool test __attribute__((unused)) = true; VERIFY( this->eback() == NULL ); VERIFY( this->gptr() == NULL ); VERIFY( this->egptr() == NULL ); @@ -92,14 +92,15 @@ void test01() typedef testbuf::traits_type traits_type; typedef testbuf::int_type int_type; - bool test = true; - char* lit01 = "chicago underground trio/possible cube on delmark"; + bool test __attribute__((unused)) = true; testbuf buf01; - int i01 = 3; // sputn/xsputn - char* lit02 = "isotope 217: the unstable molecule on thrill jockey"; - int i02 = std::strlen(lit02); + const char* lit01 = "isotope 217: the unstable molecule on thrill jockey"; + const int i02 = std::strlen(lit01); + char lit02[i02]; + std::strcpy(lit02, lit01); + char carray[i02 + 1]; std::memset(carray, 0, i02 + 1); diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/sync/char/1057.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/sync/char/1057.cc index 8e2d3c0aef7..5c75185774b 100644 --- a/libstdc++-v3/testsuite/27_io/basic_streambuf/sync/char/1057.cc +++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/sync/char/1057.cc @@ -76,7 +76,7 @@ public: // libstdc++/1057 void test04() { - bool test = true; + bool test __attribute__((unused)) = true; std::string text = "abcdefghijklmn"; // 01 diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/3.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/3.cc index 14275c2e64a..39a5e90e3be 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/3.cc @@ -57,7 +57,7 @@ struct gnu_char_traits typedef gnu_char_type char_type; typedef long int_type; typedef long pos_type; - typedef unsigned long off_type; + typedef long off_type; typedef long state_type; static void @@ -115,7 +115,7 @@ struct gnu_char_traits void test07() { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::basic_stringbuf<gnu_char_type, gnu_char_traits> gnu_ssbuf; try diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/5.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/5.cc index 4f308b98cb7..b09e94d1a9f 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/5.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/5.cc @@ -28,7 +28,7 @@ void test01() typedef std::stringbuf test_type; typedef std::streambuf base_type; const test_type& obj = test_type(); - const base_type* base = &obj; + const base_type* base __attribute__((unused)) = &obj; } int main() diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/imbue/char/9322.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/imbue/char/9322.cc index 549e59ef841..552888fba7f 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/imbue/char/9322.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/imbue/char/9322.cc @@ -27,7 +27,7 @@ void test03() { using std::locale; - bool test = true; + bool test __attribute__((unused)) = true; locale loc = std::locale::classic(); std::stringbuf ob; diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/in_avail/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/in_avail/char/1.cc index 928f9457cb4..e8e8dc9972e 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/in_avail/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/in_avail/char/1.cc @@ -32,10 +32,9 @@ std::stringbuf strb_03(str_03, std::ios_base::out); // test overloaded virtual functions void test04() { - bool test = true; + bool test __attribute__((unused)) = true; std::string str_tmp; std::stringbuf strb_tmp; - std::streamsize strmsz_1, strmsz_2; std::streamoff strmof_1(-1), strmof_2; typedef std::stringbuf::int_type int_type; typedef std::stringbuf::traits_type traits_type; @@ -47,8 +46,8 @@ void test04() strmof_1 = strb_01.in_avail(); strmof_2 = strb_02.in_avail(); VERIFY( strmof_1 != strmof_2 ); - VERIFY( strmof_1 == str_01.length() ); - VERIFY( strmof_2 == str_02.length() ); + VERIFY( strmof_1 == static_cast<std::streamoff>(str_01.length()) ); + VERIFY( strmof_2 == static_cast<std::streamoff>(str_02.length()) ); strmof_1 = strb_03.in_avail(); // zero cuz write-only, or eof()? zero, from showmany VERIFY( strmof_1 == 0 ); diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/overflow/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/overflow/char/2.cc index 90845d0ad47..38b72b51e6e 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/overflow/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/overflow/char/2.cc @@ -60,7 +60,7 @@ template<typename T> void test03() { - bool test = true; + bool test __attribute__((unused)) = true; const std::string control01("11111"); std::string test01; diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/overflow/char/3599.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/overflow/char/3599.cc index a8e3a287464..ad79cfcac65 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/overflow/char/3599.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/overflow/char/3599.cc @@ -41,14 +41,14 @@ public: protected: int_type - overflow(int_type c = traits_type::eof()) + overflow(int_type c __attribute__((unused)) = traits_type::eof()) { return traits_type::not_eof(0); } }; void test07() { - bool test = true; + bool test __attribute__((unused)) = true; testbuf ob; std::ostream out(&ob); diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/overflow/char/9988.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/overflow/char/9988.cc index abdd4def261..f9646cade91 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/overflow/char/9988.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/overflow/char/9988.cc @@ -35,7 +35,7 @@ public: void test15() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; OverBuf sb; @@ -56,7 +56,7 @@ void test15() VERIFY( c == stringbuf::traits_type::eof() ); } -main() +int main() { test15(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/char/1.cc index f075f9db759..df5173ae2b2 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/char/1.cc @@ -32,10 +32,9 @@ std::stringbuf strb_03(str_03, std::ios_base::out); // test overloaded virtual functions void test04() { - bool test = true; + bool test __attribute__((unused)) = true; std::string str_tmp; std::stringbuf strb_tmp; - std::streamsize strmsz_1, strmsz_2; std::streamoff strmof_1(-1), strmof_2; typedef std::stringbuf::int_type int_type; typedef std::stringbuf::traits_type traits_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/char/9825.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/char/9825.cc index df6fa264d0e..d49016af882 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/char/9825.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/char/9825.cc @@ -28,7 +28,7 @@ void test12() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; stringbuf sbuf; sbuf.sputn("crazy bees!", 11); @@ -43,7 +43,7 @@ void test12() VERIFY( c == 'a' ); } -main() +int main() { test12(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/char/1.cc index 579206ff160..aa32edde22d 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/char/1.cc @@ -32,11 +32,10 @@ std::stringbuf strb_03(str_03, std::ios_base::out); // test overloaded virtual functions void test04() { - bool test = true; + bool test __attribute__((unused)) = true; std::string str_tmp; std::stringbuf strb_tmp; std::streamsize strmsz_1, strmsz_2; - std::streamoff strmof_1(-1), strmof_2; typedef std::stringbuf::int_type int_type; typedef std::stringbuf::traits_type traits_type; typedef std::stringbuf::pos_type pos_type; @@ -45,8 +44,6 @@ void test04() int_type c1 = strb_01.sbumpc(); int_type c2 = strb_02.sbumpc(); int_type c3 = strb_01.sbumpc(); - int_type c4 = strb_02.sbumpc(); - int_type c5 = strb_03.sbumpc(); // PUT strb_03.str(str_01); //reset @@ -108,7 +105,7 @@ void test04() strb_01.pubseekoff(0, std::ios_base::end); strb_01.sputc('<'); str_tmp = strb_01.str(); - VERIFY( str_tmp.size() == strmsz_1 + strmsz_2 + 1 ); + VERIFY(static_cast<std::streamsize>(str_tmp.size()) == strmsz_1 + strmsz_2 + 1); // IN // OUT } diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/char/2.cc index 869cd46f56a..984e6303183 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/char/2.cc @@ -25,7 +25,7 @@ void test02(std::stringbuf& in, bool pass) { - bool test = true; + bool test __attribute__((unused)) = true; using namespace std; typedef streambuf::pos_type pos_type; typedef streambuf::off_type off_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekpos/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekpos/char/1.cc index 12143c5add7..9ed89f9da3e 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekpos/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekpos/char/1.cc @@ -32,11 +32,9 @@ std::stringbuf strb_03(str_03, std::ios_base::out); // test overloaded virtual functions void test04() { - bool test = true; + bool test __attribute__((unused)) = true; std::string str_tmp; std::stringbuf strb_tmp; - std::streamsize strmsz_1, strmsz_2; - std::streamoff strmof_1(-1), strmof_2; typedef std::stringbuf::int_type int_type; typedef std::stringbuf::traits_type traits_type; typedef std::stringbuf::pos_type pos_type; @@ -45,8 +43,6 @@ void test04() int_type c1 = strb_01.sbumpc(); int_type c2 = strb_02.sbumpc(); int_type c3 = strb_01.sbumpc(); - int_type c4 = strb_02.sbumpc(); - int_type c5 = strb_03.sbumpc(); pos_type pt_1(off_type(-1)); pos_type pt_2(off_type(0)); diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekpos/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekpos/char/2.cc index c3c6a8ad683..7a8389a8b9b 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekpos/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekpos/char/2.cc @@ -25,7 +25,7 @@ void test02(std::stringbuf& in, bool pass) { - bool test = true; + bool test __attribute__((unused)) = true; using namespace std; typedef streambuf::pos_type pos_type; typedef streambuf::off_type off_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekpos/char/3.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekpos/char/3.cc index 46cbcedf547..0e952d755c4 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekpos/char/3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekpos/char/3.cc @@ -23,7 +23,7 @@ void test01() { - bool test = true; + bool test __attribute__((unused)) = true; using namespace std; typedef stringbuf::pos_type pos_type; typedef stringbuf::off_type off_type; diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/setbuf/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/setbuf/char/1.cc index e79da0eda3a..cfed7cb319f 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/setbuf/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/setbuf/char/1.cc @@ -32,22 +32,14 @@ std::stringbuf strb_03(str_03, std::ios_base::out); // test overloaded virtual functions void test04() { - bool test = true; + bool test __attribute__((unused)) = true; std::string str_tmp; std::stringbuf strb_tmp; - std::streamsize strmsz_1, strmsz_2; - std::streamoff strmof_1(-1), strmof_2; typedef std::stringbuf::int_type int_type; typedef std::stringbuf::traits_type traits_type; typedef std::stringbuf::pos_type pos_type; typedef std::stringbuf::off_type off_type; - int_type c1 = strb_01.sbumpc(); - int_type c2 = strb_02.sbumpc(); - int_type c3 = strb_01.sbumpc(); - int_type c4 = strb_02.sbumpc(); - int_type c5 = strb_03.sbumpc(); - // PUT strb_03.str(str_01); //reset diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/setbuf/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/setbuf/char/2.cc index 0eade15314a..145141e8d67 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/setbuf/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/setbuf/char/2.cc @@ -27,7 +27,7 @@ void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; char buf[512]; const char* strlit = "how to tell a story and other essays: mark twain"; const size_t strlitsize = std::strlen(strlit); @@ -38,7 +38,7 @@ void test01() VERIFY( std::strncmp(strlit, buf, strlitsize) == 0 ); } -main() +int main() { test01(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/setbuf/char/3.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/setbuf/char/3.cc index 6a8d0b462e4..02782c526cb 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/setbuf/char/3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/setbuf/char/3.cc @@ -27,7 +27,7 @@ void test02() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; char buf[512]; const char* strlit = "how to tell a story and other essays: mark twain"; const size_t strlitsize = std::strlen(strlit); @@ -38,7 +38,7 @@ void test02() VERIFY( std::strncmp(strlit, buf, strlitsize) == 0 ); } -main() +int main() { test02(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetc/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetc/char/1.cc index c34109df6b1..274cd6159e3 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetc/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetc/char/1.cc @@ -32,10 +32,9 @@ std::stringbuf strb_03(str_03, std::ios_base::out); // test overloaded virtual functions void test04() { - bool test = true; + bool test __attribute__((unused)) = true; std::string str_tmp; std::stringbuf strb_tmp; - std::streamsize strmsz_1, strmsz_2; std::streamoff strmof_1(-1), strmof_2; typedef std::stringbuf::int_type int_type; typedef std::stringbuf::traits_type traits_type; @@ -47,8 +46,6 @@ void test04() strmof_2 = strb_02.in_avail(); strmof_1 = strb_03.in_avail(); - int_type c1 = strb_01.sbumpc(); - int_type c2 = strb_02.sbumpc(); int_type c3 = strb_01.sbumpc(); int_type c4 = strb_02.sbumpc(); int_type c5 = strb_03.sbumpc(); diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetn/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetn/char/1.cc index 420a318c86b..c68ad1424b5 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetn/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetn/char/1.cc @@ -32,7 +32,7 @@ std::stringbuf strb_03(str_03, std::ios_base::out); // test overloaded virtual functions void test04() { - bool test = true; + bool test __attribute__((unused)) = true; std::string str_tmp; std::stringbuf strb_tmp; std::streamsize strmsz_1, strmsz_2; @@ -49,7 +49,7 @@ void test04() int_type c1 = strb_01.sbumpc(); int_type c2 = strb_02.sbumpc(); - int_type c3 = strb_01.sbumpc(); + strb_01.sbumpc(); int_type c4 = strb_02.sbumpc(); int_type c5 = strb_03.sbumpc(); @@ -57,9 +57,9 @@ void test04() // if read_cur not avail, return uflow(), else return *read_cur int_type c6 = strb_01.sgetc(); int_type c7 = strb_02.sgetc(); - int_type c8 = strb_01.sgetc(); - int_type c9 = strb_02.sgetc(); - c5 = strb_03.sgetc(); + strb_01.sgetc(); + strb_02.sgetc(); + c5 = strb_03.sgetc(); // int_type snextc() // calls sbumpc and if sbumpc != eof, return sgetc @@ -74,8 +74,9 @@ void test04() strmsz_1 = strb_01.in_avail(); strmsz_2 = strb_02.in_avail(); test = strmsz_1 != strmsz_2; - VERIFY( strmsz_1 != str_01.length() ); - VERIFY( strmsz_2 != str_02.length() ); //because now we've moved into string + VERIFY( strmsz_1 != static_cast<std::streamsize>(str_01.length()) ); + // because now we've moved into string + VERIFY( strmsz_2 != static_cast<std::streamsize>(str_02.length()) ); char carray1[11] = ""; strmsz_1 = strb_01.sgetn(carray1, 10); char carray2[20] = ""; diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/snextc/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/snextc/char/1.cc index 63e3515c802..c94342143a0 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/snextc/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/snextc/char/1.cc @@ -32,10 +32,9 @@ std::stringbuf strb_03(str_03, std::ios_base::out); // test overloaded virtual functions void test04() { - bool test = true; + bool test __attribute__((unused)) = true; std::string str_tmp; std::stringbuf strb_tmp; - std::streamsize strmsz_1, strmsz_2; std::streamoff strmof_1(-1), strmof_2; typedef std::stringbuf::int_type int_type; typedef std::stringbuf::traits_type traits_type; @@ -47,10 +46,10 @@ void test04() strmof_2 = strb_02.in_avail(); strmof_1 = strb_03.in_avail(); - int_type c1 = strb_01.sbumpc(); - int_type c2 = strb_02.sbumpc(); - int_type c3 = strb_01.sbumpc(); - int_type c4 = strb_02.sbumpc(); + strb_01.sbumpc(); + strb_02.sbumpc(); + strb_01.sbumpc(); + strb_02.sbumpc(); int_type c5 = strb_03.sbumpc(); // int_type sgetc() diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputbackc/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputbackc/char/1.cc index ef7c68f72c0..853339e23c1 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputbackc/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputbackc/char/1.cc @@ -32,11 +32,10 @@ std::stringbuf strb_03(str_03, std::ios_base::out); // test overloaded virtual functions void test04() { - bool test = true; + bool test __attribute__((unused)) = true; std::string str_tmp, str_tmp2; std::stringbuf strb_tmp; std::streamsize strmsz_1, strmsz_2; - std::streamoff strmof_1(-1), strmof_2; typedef std::stringbuf::int_type int_type; typedef std::stringbuf::traits_type traits_type; typedef std::stringbuf::pos_type pos_type; @@ -46,7 +45,6 @@ void test04() int_type c2 = strb_02.sbumpc(); int_type c3 = strb_01.sbumpc(); int_type c4 = strb_02.sbumpc(); - int_type c5 = strb_03.sbumpc(); // PUT strb_03.str(str_01); //reset diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputbackc/char/9425.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputbackc/char/9425.cc index e7dcaa1dbb9..6a05d89b10d 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputbackc/char/9425.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputbackc/char/9425.cc @@ -29,14 +29,14 @@ void test09() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; stringbuf sbuf; stringbuf::int_type r = sbuf.sputbackc('a'); VERIFY( r == stringbuf::traits_type::eof() ); } -main() +int main() { test09(); return 0; diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputc/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputc/char/1.cc index 8e486424840..5fc08f2ba9b 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputc/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputc/char/1.cc @@ -32,11 +32,9 @@ std::stringbuf strb_03(str_03, std::ios_base::out); // test overloaded virtual functions void test04() { - bool test = true; + bool test __attribute__((unused)) = true; std::string str_tmp; std::stringbuf strb_tmp; - std::streamsize strmsz_1, strmsz_2; - std::streamoff strmof_1(-1), strmof_2; typedef std::stringbuf::int_type int_type; typedef std::stringbuf::traits_type traits_type; typedef std::stringbuf::pos_type pos_type; @@ -45,8 +43,6 @@ void test04() int_type c1 = strb_01.sbumpc(); int_type c2 = strb_02.sbumpc(); int_type c3 = strb_01.sbumpc(); - int_type c4 = strb_02.sbumpc(); - int_type c5 = strb_03.sbumpc(); // PUT // int_type sputc(char_type c) diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputc/char/9404-1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputc/char/9404-1.cc index 6d4019295d2..38f7ed92c48 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputc/char/9404-1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputc/char/9404-1.cc @@ -48,7 +48,7 @@ public: // libstdc++/9404 void test04() { - bool test = true; + bool test __attribute__((unused)) = true; bool over_expected; diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputn/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputn/char/1.cc index 525014c2a02..801ae7f44bd 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputn/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputn/char/1.cc @@ -32,22 +32,15 @@ std::stringbuf strb_03(str_03, std::ios_base::out); // test overloaded virtual functions void test04() { - bool test = true; + bool test __attribute__((unused)) = true; std::string str_tmp; std::stringbuf strb_tmp; std::streamsize strmsz_1, strmsz_2; - std::streamoff strmof_1(-1), strmof_2; typedef std::stringbuf::int_type int_type; typedef std::stringbuf::traits_type traits_type; typedef std::stringbuf::pos_type pos_type; typedef std::stringbuf::off_type off_type; - int_type c1 = strb_01.sbumpc(); - int_type c2 = strb_02.sbumpc(); - int_type c3 = strb_01.sbumpc(); - int_type c4 = strb_02.sbumpc(); - int_type c5 = strb_03.sbumpc(); - // PUT strb_03.str(str_01); //reset std::string::size_type sz1 = strb_03.str().length(); diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputn/char/9404-2.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputn/char/9404-2.cc index 3cb743cc699..fe26854c683 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputn/char/9404-2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputn/char/9404-2.cc @@ -48,7 +48,7 @@ public: // libstdc++/9404 void test04() { - bool test = true; + bool test __attribute__((unused)) = true; bool over_expected; Derived_stringbuf dsbuf_01; diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/str/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/str/char/1.cc index 8de264b08e8..2f9a5cf176f 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/str/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/str/char/1.cc @@ -32,7 +32,7 @@ std::stringbuf strb_03(str_03, std::ios_base::out); // test member functions void test03() { - bool test = true; + bool test __attribute__((unused)) = true; //stringbuf::str() VERIFY( strb_01.str() == str_01 ); @@ -47,7 +47,7 @@ void test03() VERIFY( d1 ); // non-zero VERIFY( !d2 ); // zero, cuz ios_base::out VERIFY( d1 != d2 ); //these should be the same - VERIFY( str_01.length() == d1 ); + VERIFY( static_cast<std::streamsize>(str_01.length()) == d1 ); VERIFY( strb_01.str() == strb_03.str() ); //ditto // stringbuf::str(string&) and stringbuf::stringbuf(string&), where the @@ -58,9 +58,9 @@ void test03() std::stringbuf strb_nulls (str_nulls); strb_normal.str(str_nulls); // tried using 'strb_01' rather than declaring // another variable, but then test04 broke! - VERIFY( strb_nulls.in_avail() == str_nulls.size() ); - VERIFY( strb_nulls.str().size() == 20 ); - VERIFY( strb_normal.in_avail() == str_nulls.size() ); + VERIFY( strb_nulls.in_avail() == static_cast<std::streamsize>(str_nulls.size()) ); + VERIFY( strb_nulls.str().size() == 20 ); + VERIFY( strb_normal.in_avail() == static_cast<std::streamsize>(str_nulls.size()) ); } int main() diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/str/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/str/char/2.cc index feabe74e1ae..f6dda2f19a2 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/str/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/str/char/2.cc @@ -27,7 +27,7 @@ // which didn't notice the grow. void test07() { - bool test = true; + bool test __attribute__((unused)) = true; std::stringbuf strb_01; strb_01.sputc('s'); diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/str/char/3.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/str/char/3.cc index 7fa42a6d1fd..038c9a7d884 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/str/char/3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/str/char/3.cc @@ -24,7 +24,7 @@ void test06() { - bool test = true; + bool test __attribute__((unused)) = true; std::ostringstream os ("foo", std::ios_base::app); os << "bar"; diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/str/char/3955.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/str/char/3955.cc index d43fd89345a..82e613d504d 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/str/char/3955.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/str/char/3955.cc @@ -25,7 +25,7 @@ // libstdc++/3955 -- ios_base::app overwrites from the beginning void test05() { - bool test = true; + bool test __attribute__((unused)) = true; std::ostringstream os ("foo"); os << "bar"; diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sungetc/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sungetc/char/1.cc index c7bb35240bd..a90885a1c6c 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sungetc/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sungetc/char/1.cc @@ -32,11 +32,10 @@ std::stringbuf strb_03(str_03, std::ios_base::out); // test overloaded virtual functions void test04() { - bool test = true; + bool test __attribute__((unused)) = true; std::string str_tmp; std::stringbuf strb_tmp; std::streamsize strmsz_1, strmsz_2; - std::streamoff strmof_1(-1), strmof_2; typedef std::stringbuf::int_type int_type; typedef std::stringbuf::traits_type traits_type; typedef std::stringbuf::pos_type pos_type; @@ -46,7 +45,6 @@ void test04() int_type c2 = strb_02.sbumpc(); int_type c3 = strb_01.sbumpc(); int_type c4 = strb_02.sbumpc(); - int_type c5 = strb_03.sbumpc(); // PUT strb_03.str(str_01); //reset diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sync/char/1057.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sync/char/1057.cc index 85717200d88..f33e39aa5f2 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sync/char/1057.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sync/char/1057.cc @@ -76,7 +76,7 @@ public: // libstdc++/1057 void test04() { - bool test = true; + bool test __attribute__((unused)) = true; std::string text = "abcdefghijklmn"; // 01 diff --git a/libstdc++-v3/testsuite/27_io/basic_stringstream/3.cc b/libstdc++-v3/testsuite/27_io/basic_stringstream/3.cc index 036d7e59bdb..896c35c6104 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringstream/3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringstream/3.cc @@ -59,7 +59,7 @@ struct gnu_char_traits typedef gnu_char_type char_type; typedef long int_type; typedef long pos_type; - typedef unsigned long off_type; + typedef long off_type; typedef long state_type; static void @@ -117,7 +117,7 @@ struct gnu_char_traits void test07() { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::basic_stringstream<gnu_char_type, gnu_char_traits> gnu_sstr; try diff --git a/libstdc++-v3/testsuite/27_io/basic_stringstream/4.cc b/libstdc++-v3/testsuite/27_io/basic_stringstream/4.cc index dcd5dc3dc64..6189c267784 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringstream/4.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringstream/4.cc @@ -29,7 +29,7 @@ void test01() typedef std::stringstream test_type; typedef std::iostream base_type; const test_type& obj = test_type(); - const base_type* base = &obj; + const base_type* base __attribute__((unused)) = &obj; } int main() diff --git a/libstdc++-v3/testsuite/27_io/basic_stringstream/rdbuf/char/2832.cc b/libstdc++-v3/testsuite/27_io/basic_stringstream/rdbuf/char/2832.cc index 5e4fe022e75..9a0b6685560 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringstream/rdbuf/char/2832.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringstream/rdbuf/char/2832.cc @@ -34,9 +34,8 @@ active_buffer(std::ios& stream) // libstdc++/2832 void test02() { - bool test = true; + bool test __attribute__((unused)) = true; const char* strlit01 = "fuck war"; - const char* strlit02 = "two less cars abstract riot crew, critical mass/SF"; const std::string str00; const std::string str01(strlit01); std::string str02; diff --git a/libstdc++-v3/testsuite/27_io/basic_stringstream/str/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringstream/str/char/1.cc index 79b1e9cb35e..45c78cdafac 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringstream/str/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringstream/str/char/1.cc @@ -25,7 +25,7 @@ void test01() { - bool test = true; + bool test __attribute__((unused)) = true; std::stringstream is01; const std::string str00; const std::string str01 = "123"; diff --git a/libstdc++-v3/testsuite/27_io/basic_stringstream/str/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_stringstream/str/char/2.cc index 04f2746bcde..397de5f1b86 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringstream/str/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringstream/str/char/2.cc @@ -34,9 +34,8 @@ active_buffer(std::ios& stream) // libstdc++/2832 void test02() { - bool test = true; + bool test __attribute__((unused)) = true; const char* strlit01 = "fuck war"; - const char* strlit02 = "two less cars abstract riot crew, critical mass/SF"; const std::string str00; const std::string str01(strlit01); std::string str02; diff --git a/libstdc++-v3/testsuite/27_io/basic_stringstream/str/char/3.cc b/libstdc++-v3/testsuite/27_io/basic_stringstream/str/char/3.cc index 47901a6e498..2d24f6b7922 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringstream/str/char/3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringstream/str/char/3.cc @@ -26,7 +26,7 @@ void test03() { - bool test = true; + bool test __attribute__((unused)) = true; // // 1: Automatic formatting of a compound string diff --git a/libstdc++-v3/testsuite/27_io/basic_stringstream/str/char/4.cc b/libstdc++-v3/testsuite/27_io/basic_stringstream/str/char/4.cc index 7d77fc2c63c..8dfe9b5d53b 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringstream/str/char/4.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringstream/str/char/4.cc @@ -26,7 +26,7 @@ // libstdc++/8466 void test04() { - bool test = true; + bool test __attribute__((unused)) = true; const char* strlit00 = "orvieto"; const std::string str00 = strlit00; diff --git a/libstdc++-v3/testsuite/27_io/fpos/mbstate_t/1.cc b/libstdc++-v3/testsuite/27_io/fpos/mbstate_t/1.cc index 3a8fef7722f..dc25b78fa5d 100644 --- a/libstdc++-v3/testsuite/27_io/fpos/mbstate_t/1.cc +++ b/libstdc++-v3/testsuite/27_io/fpos/mbstate_t/1.cc @@ -35,7 +35,7 @@ void test01() { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::mbstate_t state_type; state_type state01 = state_type(); @@ -44,12 +44,6 @@ void test01() std::streampos pos01(0); std::streampos pos02(0); - std::streamoff off01; - std::streamoff off02; - - std::streamsize size01; - std::streamsize size02; - // 27.4.3.1 fpos members // void state(state_type s); // state_type state(); diff --git a/libstdc++-v3/testsuite/27_io/fpos/mbstate_t/2.cc b/libstdc++-v3/testsuite/27_io/fpos/mbstate_t/2.cc index 46c64b8bef5..32699b97e57 100644 --- a/libstdc++-v3/testsuite/27_io/fpos/mbstate_t/2.cc +++ b/libstdc++-v3/testsuite/27_io/fpos/mbstate_t/2.cc @@ -36,16 +36,12 @@ // 27.4.3.2 fpos requirements/invariants void test02() { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::mbstate_t state_type; - state_type state01; - state_type state02; std::streamoff off01; std::streamoff off02 = 997; - - int i01 = 0; int i02 = 999; // p(i), p = i diff --git a/libstdc++-v3/testsuite/27_io/fpos/mbstate_t/3.cc b/libstdc++-v3/testsuite/27_io/fpos/mbstate_t/3.cc index 777de9e7ad0..4b79950fa8c 100644 --- a/libstdc++-v3/testsuite/27_io/fpos/mbstate_t/3.cc +++ b/libstdc++-v3/testsuite/27_io/fpos/mbstate_t/3.cc @@ -35,18 +35,11 @@ void test03() { - bool test = true; + bool test __attribute__((unused)) = true; typedef std::mbstate_t state_type; - state_type state01; - state_type state02; - std::streamoff off01; - std::streamoff off02 = 997; - int i01 = 0; - int i02 = 999; - // casts to const streamoff // (yes, I know this is weak code) const std::streampos pos01 = 0; diff --git a/libstdc++-v3/testsuite/27_io/ios_base/callbacks/1.cc b/libstdc++-v3/testsuite/27_io/ios_base/callbacks/1.cc index 09cfee4affd..001d8fab825 100644 --- a/libstdc++-v3/testsuite/27_io/ios_base/callbacks/1.cc +++ b/libstdc++-v3/testsuite/27_io/ios_base/callbacks/1.cc @@ -28,20 +28,20 @@ const std::string str01("the nubians of plutonia"); std::string str02; void -callb01(std::ios_base::event e, std::ios_base& b, int i) +callb01(std::ios_base::event, std::ios_base&, int) { str02 += "the nubians"; } void -callb02(std::ios_base::event e, std::ios_base& b, int i) +callb02(std::ios_base::event, std::ios_base&, int) { str02 += " of "; } void -callb03(std::ios_base::event e, std::ios_base& b, int i) +callb03(std::ios_base::event, std::ios_base&, int) { str02 += "plutonia"; } void test01() { - bool test = true; + bool test __attribute__((unused)) = true; std::locale loc("C"); std::stringbuf strbuf01; std::ios ios01(&strbuf01); diff --git a/libstdc++-v3/testsuite/27_io/ios_base/state/1.cc b/libstdc++-v3/testsuite/27_io/ios_base/state/1.cc index bc6a356edd3..0dcae30c218 100644 --- a/libstdc++-v3/testsuite/27_io/ios_base/state/1.cc +++ b/libstdc++-v3/testsuite/27_io/ios_base/state/1.cc @@ -33,7 +33,7 @@ void test02() { - bool test = true; + bool test __attribute__((unused)) = true; const std::string strue("true"); const std::string sfalse("false"); std::string str01; @@ -42,7 +42,7 @@ test02() std::locale loc_c = std::locale::classic(); std::ostringstream ostr01; ostr01.imbue(loc_c); - std::ios_base::fmtflags ff = ostr01.flags(std::ios_base::boolalpha); + ostr01.flags(std::ios_base::boolalpha); ostr01 << true; str02 = ostr01.str(); diff --git a/libstdc++-v3/testsuite/27_io/ios_base/storage/1.cc b/libstdc++-v3/testsuite/27_io/ios_base/storage/1.cc index ee27d44788c..ce5303111ac 100644 --- a/libstdc++-v3/testsuite/27_io/ios_base/storage/1.cc +++ b/libstdc++-v3/testsuite/27_io/ios_base/storage/1.cc @@ -33,13 +33,13 @@ // http://gcc.gnu.org/ml/gcc-bugs/2000-12/msg00413.html void test01() { - bool test = true; + bool test __attribute__((unused)) = true; using namespace std; - long x1 = ios::xalloc(); - long x2 = ios::xalloc(); - long x3 = ios::xalloc(); + ios::xalloc(); + ios::xalloc(); + ios::xalloc(); long x4 = ios::xalloc(); ostringstream out("the element of crime, lars von trier"); diff --git a/libstdc++-v3/testsuite/27_io/ios_base/storage/2.cc b/libstdc++-v3/testsuite/27_io/ios_base/storage/2.cc index 7df7eb965b4..960669e4804 100644 --- a/libstdc++-v3/testsuite/27_io/ios_base/storage/2.cc +++ b/libstdc++-v3/testsuite/27_io/ios_base/storage/2.cc @@ -33,7 +33,7 @@ // libstdc++/3129 void test02() { - bool test = true; + bool test __attribute__((unused)) = true; int max = std::numeric_limits<int>::max() - 1; std::stringbuf strbuf; std::ios ios(&strbuf); diff --git a/libstdc++-v3/testsuite/27_io/ios_base/sync_with_stdio/2.cc b/libstdc++-v3/testsuite/27_io/ios_base/sync_with_stdio/2.cc index b645b4a98fd..0976192fc9f 100644 --- a/libstdc++-v3/testsuite/27_io/ios_base/sync_with_stdio/2.cc +++ b/libstdc++-v3/testsuite/27_io/ios_base/sync_with_stdio/2.cc @@ -33,7 +33,7 @@ void test02() { - bool test = true; + bool test __attribute__((unused)) = true; std::stringbuf strbuf01; std::ios ios01(&strbuf01); diff --git a/libstdc++-v3/testsuite/27_io/manipulators/adjustfield/char/1.cc b/libstdc++-v3/testsuite/27_io/manipulators/adjustfield/char/1.cc index b3901d8f7b8..ce69fc26d64 100644 --- a/libstdc++-v3/testsuite/27_io/manipulators/adjustfield/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/manipulators/adjustfield/char/1.cc @@ -54,7 +54,7 @@ std::string MyNP::do_falsename() const void test01() { - bool test = true; + bool test __attribute__((unused)) = true; const char lit[] = "1 0\ntrue false\n: true:\n:true :\n: false:\n: 1:" "\n:1 :\n: 0:\nyea nay\n: yea:\n:yea :\n: nay:\n"; std::ostringstream oss; diff --git a/libstdc++-v3/testsuite/27_io/manipulators/adjustfield/char/2.cc b/libstdc++-v3/testsuite/27_io/manipulators/adjustfield/char/2.cc index 12b52aa0134..cf2253c0d61 100644 --- a/libstdc++-v3/testsuite/27_io/manipulators/adjustfield/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/manipulators/adjustfield/char/2.cc @@ -32,7 +32,7 @@ void test02() { - bool test = true; + bool test __attribute__((unused)) = true; const std::string str_blank; std::string str_tmp; std::stringbuf strbuf; diff --git a/libstdc++-v3/testsuite/27_io/manipulators/basefield/char/1.cc b/libstdc++-v3/testsuite/27_io/manipulators/basefield/char/1.cc index 10336f50f1c..f16eb1a9c6c 100644 --- a/libstdc++-v3/testsuite/27_io/manipulators/basefield/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/manipulators/basefield/char/1.cc @@ -44,7 +44,7 @@ char MyNP::do_thousands_sep() const { return ' '; } void test01() { - bool test = true; + bool test __attribute__((unused)) = true; const char lit[] = "0123 456\n: 01 234 567:\n:0123 456 :\n" ": 012 345:\n: 01 234:\n:0726 746 425:\n" diff --git a/libstdc++-v3/testsuite/27_io/manipulators/standard/char/1.cc b/libstdc++-v3/testsuite/27_io/manipulators/standard/char/1.cc index 71822372fc8..d2d6b82dd09 100644 --- a/libstdc++-v3/testsuite/27_io/manipulators/standard/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/manipulators/standard/char/1.cc @@ -26,7 +26,7 @@ void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; string s("john coltrane, a love supreme"); istringstream iss(s); diff --git a/libstdc++-v3/testsuite/27_io/manipulators/standard/char/2.cc b/libstdc++-v3/testsuite/27_io/manipulators/standard/char/2.cc index b7ee2b4b6f5..be6c22deb05 100644 --- a/libstdc++-v3/testsuite/27_io/manipulators/standard/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/manipulators/standard/char/2.cc @@ -35,7 +35,7 @@ void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; string x (" this is text"); istringstream sin (x); ostringstream sout; diff --git a/libstdc++-v3/testsuite/27_io/objects/char/1.cc b/libstdc++-v3/testsuite/27_io/objects/char/1.cc index 6ab05e861f1..78e58cf9bf0 100644 --- a/libstdc++-v3/testsuite/27_io/objects/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/objects/char/1.cc @@ -75,7 +75,7 @@ // Make sure all the standard streams are defined. void test01() { - bool test = true; + bool test __attribute__((unused)) = true; char array1[20]; typedef std::ios::traits_type ctraits_type; diff --git a/libstdc++-v3/testsuite/27_io/objects/char/10.cc b/libstdc++-v3/testsuite/27_io/objects/char/10.cc index 4990a58857d..57188ca10d3 100644 --- a/libstdc++-v3/testsuite/27_io/objects/char/10.cc +++ b/libstdc++-v3/testsuite/27_io/objects/char/10.cc @@ -26,7 +26,7 @@ void test10() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; const char* name = "filebuf_virtuals-1.txt"; FILE* ret = freopen(name, "r", stdin); diff --git a/libstdc++-v3/testsuite/27_io/objects/char/3045.cc b/libstdc++-v3/testsuite/27_io/objects/char/3045.cc index ad190d0f2b5..a65eff54b51 100644 --- a/libstdc++-v3/testsuite/27_io/objects/char/3045.cc +++ b/libstdc++-v3/testsuite/27_io/objects/char/3045.cc @@ -46,7 +46,7 @@ gnu_filebuf buf(initial); // libstdc++/3045, in a vague way. void test01() { - bool test = true; + bool test __attribute__((unused)) = true; int k1; // 1 normal diff --git a/libstdc++-v3/testsuite/27_io/objects/char/5.cc b/libstdc++-v3/testsuite/27_io/objects/char/5.cc index aa15e936363..da93e83e127 100644 --- a/libstdc++-v3/testsuite/27_io/objects/char/5.cc +++ b/libstdc++-v3/testsuite/27_io/objects/char/5.cc @@ -69,7 +69,7 @@ int use_standard_streams() void test05() { - bool test = true; + bool test __attribute__((unused)) = true; int i = static_ob.i; VERIFY( std::cin.iword(i) == i + 1 ); diff --git a/libstdc++-v3/testsuite/27_io/objects/char/6.cc b/libstdc++-v3/testsuite/27_io/objects/char/6.cc index af3aa8c0b47..df86b33c26a 100644 --- a/libstdc++-v3/testsuite/27_io/objects/char/6.cc +++ b/libstdc++-v3/testsuite/27_io/objects/char/6.cc @@ -37,7 +37,7 @@ protected: void test06() { - bool test = true; + bool test __attribute__((unused)) = true; try { diff --git a/libstdc++-v3/testsuite/27_io/objects/char/6548_xin.cc b/libstdc++-v3/testsuite/27_io/objects/char/6548_xin.cc index ce6133bc39b..e29b2082152 100644 --- a/libstdc++-v3/testsuite/27_io/objects/char/6548_xin.cc +++ b/libstdc++-v3/testsuite/27_io/objects/char/6548_xin.cc @@ -24,7 +24,7 @@ // libstdc++/6548 void test07() { - bool test = true; + bool test __attribute__((unused)) = true; std::cout << "Enter 'test':"; std::string s; std::getline(std::cin, s, '\n'); diff --git a/libstdc++-v3/testsuite/27_io/objects/char/6648-1_xin.cc b/libstdc++-v3/testsuite/27_io/objects/char/6648-1_xin.cc index 9802f092a1f..f6d8dd8638b 100644 --- a/libstdc++-v3/testsuite/27_io/objects/char/6648-1_xin.cc +++ b/libstdc++-v3/testsuite/27_io/objects/char/6648-1_xin.cc @@ -24,7 +24,7 @@ // Interactive tests: each one (run alone) must terminate upon a single '\n'. void test08() { - bool test = true; + bool test __attribute__((unused)) = true; char buff[2048]; std::cout << "Enter name: "; std::cin.getline(buff, 2048); diff --git a/libstdc++-v3/testsuite/27_io/objects/char/6648-2_xin.cc b/libstdc++-v3/testsuite/27_io/objects/char/6648-2_xin.cc index e25a8c3e765..efe4e65bec4 100644 --- a/libstdc++-v3/testsuite/27_io/objects/char/6648-2_xin.cc +++ b/libstdc++-v3/testsuite/27_io/objects/char/6648-2_xin.cc @@ -22,7 +22,7 @@ void test09() { - bool test = true; + bool test __attribute__((unused)) = true; std::cout << "Enter favorite beach: "; std::cin.ignore(2048, '\n'); } diff --git a/libstdc++-v3/testsuite/27_io/objects/char/7.cc b/libstdc++-v3/testsuite/27_io/objects/char/7.cc index 3e3e7232f03..21a7b49c479 100644 --- a/libstdc++-v3/testsuite/27_io/objects/char/7.cc +++ b/libstdc++-v3/testsuite/27_io/objects/char/7.cc @@ -36,7 +36,7 @@ void test07() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; const char* name = "tmp_fifo4"; diff --git a/libstdc++-v3/testsuite/27_io/objects/char/7744_xin.cc b/libstdc++-v3/testsuite/27_io/objects/char/7744_xin.cc index 977af9a4429..a3dc9805a45 100644 --- a/libstdc++-v3/testsuite/27_io/objects/char/7744_xin.cc +++ b/libstdc++-v3/testsuite/27_io/objects/char/7744_xin.cc @@ -24,7 +24,7 @@ // libstdc++/7744 void test11() { - bool test = true; + bool test __attribute__((unused)) = true; std::ios::sync_with_stdio(false); std::cout << "Type in the characters 'abc' and press <ENTER>: "; diff --git a/libstdc++-v3/testsuite/27_io/objects/char/8.cc b/libstdc++-v3/testsuite/27_io/objects/char/8.cc index 28a06a10ad3..7f39c313228 100644 --- a/libstdc++-v3/testsuite/27_io/objects/char/8.cc +++ b/libstdc++-v3/testsuite/27_io/objects/char/8.cc @@ -25,7 +25,7 @@ void test02() { - bool test = true; + bool test __attribute__((unused)) = true; // 27.3 - Standard iostream objects p 2 // The objects are not destroyed during program execution. diff --git a/libstdc++-v3/testsuite/27_io/objects/char/9.cc b/libstdc++-v3/testsuite/27_io/objects/char/9.cc index faa05e65ebf..32424133d40 100644 --- a/libstdc++-v3/testsuite/27_io/objects/char/9.cc +++ b/libstdc++-v3/testsuite/27_io/objects/char/9.cc @@ -26,7 +26,7 @@ void test09() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; const char* name = "tmp_09"; FILE* fout = fopen(name, "w"); diff --git a/libstdc++-v3/testsuite/27_io/objects/char/9661-1.cc b/libstdc++-v3/testsuite/27_io/objects/char/9661-1.cc index c4890cc5d19..61855064277 100644 --- a/libstdc++-v3/testsuite/27_io/objects/char/9661-1.cc +++ b/libstdc++-v3/testsuite/27_io/objects/char/9661-1.cc @@ -37,7 +37,7 @@ void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; const char* name = "tmp_fifo5"; diff --git a/libstdc++-v3/testsuite/27_io/objects/char/9661-2_xin.cc b/libstdc++-v3/testsuite/27_io/objects/char/9661-2_xin.cc index 6b617463608..f88ab64d621 100644 --- a/libstdc++-v3/testsuite/27_io/objects/char/9661-2_xin.cc +++ b/libstdc++-v3/testsuite/27_io/objects/char/9661-2_xin.cc @@ -26,7 +26,7 @@ void test02() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; int c1 = fgetc(stdin); int c2 = cin.rdbuf()->sputbackc(c1); diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/1.cc index c766cd6fa5b..61b654833ab 100644 --- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/1.cc @@ -78,7 +78,7 @@ void test01() { - bool test = true; + bool test __attribute__((unused)) = true; wchar_t array2[20]; typedef std::wios::traits_type wtraits_type; diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/10.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/10.cc index f797380836f..3c576530b31 100644 --- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/10.cc +++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/10.cc @@ -27,7 +27,7 @@ void test10() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; const char* name = "tmp_10"; locale loc(__gnu_test::try_named_locale("se_NO.UTF-8")); diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/11.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/11.cc index d538612a60d..576b6107882 100644 --- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/11.cc +++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/11.cc @@ -27,7 +27,7 @@ void test11() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; const char* name = "tmp_11"; locale loc(__gnu_test::try_named_locale("se_NO.UTF-8")); diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/12.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/12.cc index 50e4e78cd8c..c5c70450ba7 100644 --- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/12.cc +++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/12.cc @@ -32,7 +32,7 @@ void test12() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; const char* name = "tmp_12"; locale loc(__gnu_test::try_named_locale("se_NO.UTF-8")); diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/13.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/13.cc index b974b4afb85..b4f735101d7 100644 --- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/13.cc +++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/13.cc @@ -32,7 +32,7 @@ void test13() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; const char* name = "tmp_13"; locale loc(__gnu_test::try_named_locale("se_NO.UTF-8")); @@ -104,7 +104,7 @@ void test13() wchar_t wbuf[wlen + 10]; wcin.read(wbuf, wlen + 10); streamsize n = wcin.gcount(); - VERIFY( n == wlen ); + VERIFY( n == static_cast<streamsize>(wlen) ); VERIFY( !wmemcmp(wbuf, wstr, wlen) ); VERIFY( wcin.eof() ); VERIFY( wcin.fail() ); diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/3045.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/3045.cc index acc45b25b77..9f266f26bd0 100644 --- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/3045.cc +++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/3045.cc @@ -46,7 +46,7 @@ gnu_filebuf buf(initial); // libstdc++/3045, in a vague way. void test01() { - bool test = true; + bool test __attribute__((unused)) = true; int k1; // 1 normal diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/5.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/5.cc index 267bc792acd..318598f5e9d 100644 --- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/5.cc +++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/5.cc @@ -69,7 +69,7 @@ int use_standard_streams() void test05() { - bool test = true; + bool test __attribute__((unused)) = true; int i = static_ob.i; VERIFY( std::wcin.iword(i) == i + 1 ); diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/6548_xin.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/6548_xin.cc index 0466b675477..8bec16fd77e 100644 --- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/6548_xin.cc +++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/6548_xin.cc @@ -24,7 +24,7 @@ // libstdc++/6548 void test07() { - bool test = true; + bool test __attribute__((unused)) = true; std::wcout << L"Enter 'test':"; std::wstring s; std::getline(std::wcin, s, L'\n'); diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/6648-1_xin.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/6648-1_xin.cc index 4db05d1e06f..7417f883d10 100644 --- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/6648-1_xin.cc +++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/6648-1_xin.cc @@ -24,7 +24,7 @@ // Interactive tests: each one (run alone) must terminate upon a single '\n'. void test08() { - bool test = true; + bool test __attribute__((unused)) = true; wchar_t buff[2048]; std::wcout << "Enter name: "; std::wcin.getline(buff, 2048); diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/6648-2_xin.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/6648-2_xin.cc index 778c58f07b4..13cd6a5d423 100644 --- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/6648-2_xin.cc +++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/6648-2_xin.cc @@ -22,7 +22,7 @@ void test09() { - bool test = true; + bool test __attribute__((unused)) = true; std::wcout << L"Enter favorite beach: "; std::wcin.ignore(2048, '\n'); } diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/7.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/7.cc index fcdeaba2ff5..004687af01f 100644 --- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/7.cc +++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/7.cc @@ -33,7 +33,7 @@ void test07() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; const char* name = "tmp_fifo4"; diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/7744_xin.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/7744_xin.cc index e4ca3b95d46..0bcb122cd37 100644 --- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/7744_xin.cc +++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/7744_xin.cc @@ -24,7 +24,7 @@ // libstdc++/7744 void test11() { - bool test = true; + bool test __attribute__((unused)) = true; std::ios::sync_with_stdio(false); std::wcout << "Type in the characters 'abc' and press <ENTER>: "; diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/8.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/8.cc index 346d0fc81d4..b1427f3cf52 100644 --- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/8.cc +++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/8.cc @@ -25,7 +25,7 @@ void test02() { - bool test = true; + bool test __attribute__((unused)) = true; // 27.3 - Standard iostream objects p 2 // The objects are not destroyed during program execution. diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/9520.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/9520.cc index 79d087840c5..6d41e9b5e5e 100644 --- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/9520.cc +++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/9520.cc @@ -26,7 +26,7 @@ void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; const char* name = "tmp_9520"; FILE* file = fopen(name, "w"); diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/9661-1.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/9661-1.cc index 0d8d6283521..9c9d082546d 100644 --- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/9661-1.cc +++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/9661-1.cc @@ -34,7 +34,7 @@ void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; const char* name = "tmp_fifo5"; diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/9661-2_xin.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/9661-2_xin.cc index 351a91b6f03..40e2151565f 100644 --- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/9661-2_xin.cc +++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/9661-2_xin.cc @@ -27,7 +27,7 @@ void test02() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; wint_t c1 = fgetwc(stdin); wint_t c2 = wcin.rdbuf()->sputbackc(c1); diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/9662.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/9662.cc index 27c7ff7f7cd..15d6c513f16 100644 --- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/9662.cc +++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/9662.cc @@ -27,7 +27,7 @@ // on stdout. void test01() { - bool test = true; + bool test __attribute__((unused)) = true; std::wcout << L"Hello, "; VERIFY( std::fwide(stdout, 0) >= 0 ); diff --git a/libstdc++-v3/testsuite/27_io/types/2.cc b/libstdc++-v3/testsuite/27_io/types/2.cc index c64e20b78fb..6e0cb502220 100644 --- a/libstdc++-v3/testsuite/27_io/types/2.cc +++ b/libstdc++-v3/testsuite/27_io/types/2.cc @@ -27,7 +27,7 @@ void test01() std::streamoff soff; // No signed/unsigned warnings. - long l = ssize; + long l __attribute__((unused)) = ssize; // Wrapped in pos_type is EOF. soff = -1; diff --git a/libstdc++-v3/testsuite/backward/strstream_members.cc b/libstdc++-v3/testsuite/backward/strstream_members.cc index 107041041f7..906201c8967 100644 --- a/libstdc++-v3/testsuite/backward/strstream_members.cc +++ b/libstdc++-v3/testsuite/backward/strstream_members.cc @@ -23,17 +23,16 @@ // { dg-options "-Wno-deprecated" } -int test01() +void test01() { std::strstream s; for (unsigned i=0 ; i!= 1000 ; ++i) s << i << std::endl; s << std::ends; - return 0; } -int test02() +void test02() { std::ostrstream buf; buf << std::ends; diff --git a/libstdc++-v3/testsuite/ext/allocators.cc b/libstdc++-v3/testsuite/ext/allocators.cc index 34188c47328..85205d53a7b 100644 --- a/libstdc++-v3/testsuite/ext/allocators.cc +++ b/libstdc++-v3/testsuite/ext/allocators.cc @@ -64,7 +64,7 @@ operator delete(void *v) throw() template<typename Alloc, bool uses_global_new_and_delete> void check_allocator() { - bool test = true; + bool test __attribute__((unused)) = true; new_called = false; delete_called = false; requested = 0; diff --git a/libstdc++-v3/testsuite/ext/hash_map.cc b/libstdc++-v3/testsuite/ext/hash_map.cc index 55b740f3ee8..9911968c027 100644 --- a/libstdc++-v3/testsuite/ext/hash_map.cc +++ b/libstdc++-v3/testsuite/ext/hash_map.cc @@ -68,7 +68,7 @@ const int Size = 5; void test01() { - bool test = true; + bool test __attribute__((unused)) = true; for (int i = 0; i < 10; i++) { diff --git a/libstdc++-v3/testsuite/ext/hash_set.cc b/libstdc++-v3/testsuite/ext/hash_set.cc index 068bdcd2e76..de0020dd626 100644 --- a/libstdc++-v3/testsuite/ext/hash_set.cc +++ b/libstdc++-v3/testsuite/ext/hash_set.cc @@ -26,7 +26,7 @@ void test01() { - bool test = true; + bool test __attribute__((unused)) = true; const int werte[] = { 1, 25, 9, 16, -36}; const int anzahl = sizeof(werte) / sizeof(int); __gnu_cxx::hash_set<int> intTable(werte, werte + anzahl); diff --git a/libstdc++-v3/testsuite/ext/pod_char_traits.cc b/libstdc++-v3/testsuite/ext/pod_char_traits.cc index 0a6934830d7..d18afde8a0c 100644 --- a/libstdc++-v3/testsuite/ext/pod_char_traits.cc +++ b/libstdc++-v3/testsuite/ext/pod_char_traits.cc @@ -41,7 +41,7 @@ int main() typedef character<value_type, int_type> char_type; typedef std::char_traits<char_type> traits_type; - bool test = true; + bool test __attribute__((unused)) = true; // 1 char_type <-> value_type conversions value_type uc1 = 'c'; @@ -70,8 +70,8 @@ int main() str += c7; str += c8; str += c9; - string_type::size_type len = str.size(); - const char_type* arr = str.c_str(); + string_type::size_type len __attribute__((unused)) = str.size(); + const char_type* arr __attribute__((unused)) = str.c_str(); return 0; } diff --git a/libstdc++-v3/testsuite/ext/stdio_filebuf_2.cc b/libstdc++-v3/testsuite/ext/stdio_filebuf_2.cc index a46f2399b42..1ef57eecb21 100644 --- a/libstdc++-v3/testsuite/ext/stdio_filebuf_2.cc +++ b/libstdc++-v3/testsuite/ext/stdio_filebuf_2.cc @@ -30,7 +30,7 @@ void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; const char* name = "tmp_file1"; FILE* file = fopen(name, "w"); diff --git a/libstdc++-v3/testsuite/ext/stdio_sync_filebuf_char.cc b/libstdc++-v3/testsuite/ext/stdio_sync_filebuf_char.cc index 095829621fb..5134cadfbe9 100644 --- a/libstdc++-v3/testsuite/ext/stdio_sync_filebuf_char.cc +++ b/libstdc++-v3/testsuite/ext/stdio_sync_filebuf_char.cc @@ -25,7 +25,7 @@ void test01() { using namespace std; - bool test = true; + bool test __attribute__((unused)) = true; const char* c_lit = "black pearl jasmine tea"; int size = strlen(c_lit); const char* name = "stdiobuf-1.txt"; @@ -59,7 +59,7 @@ void test01() // libstdc++/12048 void test02() { - bool test = true; + bool test __attribute__((unused)) = true; const char* name = "cin_unget-1.txt"; std::FILE* file = std::fopen(name, "r"); @@ -77,7 +77,7 @@ void test02() // libstdc++/12048 void test03() { - bool test = true; + bool test __attribute__((unused)) = true; const char* name = "cin_unget-1.txt"; std::FILE* file = std::fopen(name, "r"); @@ -95,7 +95,7 @@ void test03() // libstdc++/12048 void test04() { - bool test = true; + bool test __attribute__((unused)) = true; const char* name = "cin_unget-1.txt"; std::FILE* file = std::fopen(name, "r"); @@ -113,7 +113,7 @@ void test04() // libstdc++/12048 void test05() { - bool test = true; + bool test __attribute__((unused)) = true; const char* name = "cin_unget-1.txt"; std::FILE* file = std::fopen(name, "r"); diff --git a/libstdc++-v3/testsuite/ext/stdio_sync_filebuf_wchar_t.cc b/libstdc++-v3/testsuite/ext/stdio_sync_filebuf_wchar_t.cc index 25276a2d677..96831c3c2f4 100644 --- a/libstdc++-v3/testsuite/ext/stdio_sync_filebuf_wchar_t.cc +++ b/libstdc++-v3/testsuite/ext/stdio_sync_filebuf_wchar_t.cc @@ -24,8 +24,9 @@ void test01() { using namespace std; + typedef char_traits<wchar_t> traits_type; - bool test = true; + bool test __attribute__((unused)) = true; const char* c_lit = "black pearl jasmine tea"; const wchar_t* w_lit = L"black pearl jasmine tea"; int size = strlen(c_lit); @@ -38,13 +39,13 @@ void test01() FILE* fin = fopen(name, "r"); __gnu_cxx::stdio_sync_filebuf<wchar_t> wsbuf(fin); - VERIFY( wsbuf.sgetc() == w_lit[0] ); - VERIFY( getwc(fin) == w_lit[0] ); - VERIFY( wsbuf.sgetc() == w_lit[1] ); - VERIFY( wsbuf.sbumpc() == w_lit[1] ); + VERIFY( traits_type::to_char_type(wsbuf.sgetc()) == w_lit[0] ); + VERIFY( traits_type::to_char_type(getwc(fin)) == w_lit[0] ); + VERIFY( traits_type::to_char_type(wsbuf.sgetc()) == w_lit[1] ); + VERIFY( traits_type::to_char_type(wsbuf.sbumpc()) == w_lit[1] ); VERIFY( ungetwc(L'Z', fin) == L'Z' ); VERIFY( wsbuf.sbumpc() == L'Z' ); - VERIFY( getwc(fin) == w_lit[2] ); + VERIFY( traits_type::to_char_type(getwc(fin)) == w_lit[2] ); VERIFY( wsbuf.sputbackc(L'X') == L'X' ); VERIFY( getwc(fin) == L'X' ); @@ -52,7 +53,7 @@ void test01() wmemset(buf, 0xdeadbeef, 5); VERIFY( wsbuf.sgetn(buf, 5) == 5 ); VERIFY( !wmemcmp(buf, w_lit + 3, 5) ); - VERIFY( getwc(fin) == w_lit[8] ); + VERIFY( traits_type::to_char_type(getwc(fin)) == w_lit[8] ); fclose(fin); } @@ -60,7 +61,7 @@ void test01() // libstdc++/12048 void test02() { - bool test = true; + bool test __attribute__((unused)) = true; const char* name = "cin_unget-1.txt"; std::FILE* file = std::fopen(name, "r"); @@ -78,7 +79,7 @@ void test02() // libstdc++/12048 void test03() { - bool test = true; + bool test __attribute__((unused)) = true; const char* name = "cin_unget-1.txt"; std::FILE* file = std::fopen(name, "r"); @@ -96,7 +97,7 @@ void test03() // libstdc++/12048 void test04() { - bool test = true; + bool test __attribute__((unused)) = true; const char* name = "cin_unget-1.txt"; std::FILE* file = std::fopen(name, "r"); @@ -114,7 +115,7 @@ void test04() // libstdc++/12048 void test05() { - bool test = true; + bool test __attribute__((unused)) = true; const char* name = "cin_unget-1.txt"; std::FILE* file = std::fopen(name, "r"); diff --git a/libstdc++-v3/testsuite/performance/map_create_fill.cc b/libstdc++-v3/testsuite/performance/map_create_fill.cc index b2f52554143..0e675d00ffb 100644 --- a/libstdc++-v3/testsuite/performance/map_create_fill.cc +++ b/libstdc++-v3/testsuite/performance/map_create_fill.cc @@ -26,7 +26,7 @@ static void create_and_fill(const unsigned int n) { typedef std::map<int, int> Map; Map m; - bool test = true; + bool test __attribute__((unused)) = true; for (unsigned int i = 0; i < n; ++i) m[i] = i; diff --git a/libstdc++-v3/testsuite/testsuite_hooks.h b/libstdc++-v3/testsuite/testsuite_hooks.h index 698433582cf..e68850979ee 100644 --- a/libstdc++-v3/testsuite/testsuite_hooks.h +++ b/libstdc++-v3/testsuite/testsuite_hooks.h @@ -337,7 +337,7 @@ namespace std typedef __gnu_test::pod_char char_type; typedef __gnu_test::pod_int int_type; typedef long pos_type; - typedef unsigned long off_type; + typedef long off_type; typedef __gnu_test::state state_type; static void diff --git a/libstdc++-v3/testsuite/thread/pthread1.cc b/libstdc++-v3/testsuite/thread/pthread1.cc index 1283a75119a..92a5f312842 100644 --- a/libstdc++-v3/testsuite/thread/pthread1.cc +++ b/libstdc++-v3/testsuite/thread/pthread1.cc @@ -100,7 +100,7 @@ consume (void* t) } int -main (int argc, char** argv) +main () { pthread_t prod[thread_pairs]; pthread_t cons[thread_pairs]; diff --git a/libstdc++-v3/testsuite/thread/pthread5.cc b/libstdc++-v3/testsuite/thread/pthread5.cc index cc556046d4d..262796e0ba7 100644 --- a/libstdc++-v3/testsuite/thread/pthread5.cc +++ b/libstdc++-v3/testsuite/thread/pthread5.cc @@ -50,7 +50,7 @@ struct tt_t void* thread_function (void* arg) { - int myid = *(int*) arg; + int myid __attribute__((unused)) = *(int*) arg; for (int i = 0; i < LOOPS; i++) { vector<tt_t> myvect1; @@ -88,7 +88,7 @@ thread_function (void* arg) } int -main (int argc, char *argv[]) +main () { int worker; pthread_t threads[NTHREADS]; diff --git a/libstdc++-v3/testsuite/thread/pthread6.cc b/libstdc++-v3/testsuite/thread/pthread6.cc index d88f77e77e1..c72acb53985 100644 --- a/libstdc++-v3/testsuite/thread/pthread6.cc +++ b/libstdc++-v3/testsuite/thread/pthread6.cc @@ -37,8 +37,8 @@ const int loops = 100000; const char* my_default = "Hallo Welt!"; -const int upper_limit = 2500; -const int lower_limit = 1000; +const std::size_t upper_limit = 2500; +const std::size_t lower_limit = 1000; typedef char charT; diff --git a/libstdc++-v3/testsuite/thread/pthread7-rope.cc b/libstdc++-v3/testsuite/thread/pthread7-rope.cc index 716ba00ccab..36acd461e87 100644 --- a/libstdc++-v3/testsuite/thread/pthread7-rope.cc +++ b/libstdc++-v3/testsuite/thread/pthread7-rope.cc @@ -36,7 +36,7 @@ const int max_loop_count = 10000; __gnu_cxx::crope foo4; -void* thread_main (void *) +void* thread_main(void *) { // To see a problem with gcc 3.3 and before, set a break point here. // Single step through c_str implementation, call sched_yield after @@ -48,13 +48,16 @@ void* thread_main (void *) // Please note that the memory leak in the rope implementation with // this test case, existed before and after fixing this bug... - + bool test __attribute__((unused)) = true; VERIFY( !std::strcmp (data4, "barbazbonglehellohellohello") ); + return 0; } int main() { + bool test __attribute__((unused)) = true; + pthread_t tid[max_thread_count]; #if defined(__sun) && defined(__svr4__) |