diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2010-01-25 18:02:41 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2010-01-25 18:02:41 +0000 |
commit | 315a716efba48aad7ae39e437084c03036c0377c (patch) | |
tree | 24568c6a5cd794b7f6694a13667e7dc1d3cbc3e4 /libstdc++-v3 | |
parent | ad1e51700e69517f0bb8b14d3f7a23d2e33550b7 (diff) | |
download | gcc-315a716efba48aad7ae39e437084c03036c0377c.zip gcc-315a716efba48aad7ae39e437084c03036c0377c.tar.gz gcc-315a716efba48aad7ae39e437084c03036c0377c.tar.bz2 |
6.cc: Use an int as loop variable, to avoid -Wall warnings.
2010-01-25 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/22_locale/time_get/get_monthname/char/6.cc: Use an int
as loop variable, to avoid -Wall warnings.
* testsuite/22_locale/time_get/get_monthname/wchar_t/6.cc: Likewise.
* testsuite/22_locale/time_get/get_weekday/char/6.cc: Likewise.
* testsuite/22_locale/time_get/get_weekday/wchar_t/6.cc: Likewise.
* testsuite/22_locale/time_get/get_weekday/char/38081-2.cc: Likewise.
* testsuite/20_util/reference_wrapper/24803.cc: Remove unused vars.
* testsuite/20_util/reference_wrapper/invoke.cc: Likewise.
From-SVN: r156219
Diffstat (limited to 'libstdc++-v3')
8 files changed, 39 insertions, 30 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 28db3d7..4cea65d 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,15 @@ +2010-01-25 Paolo Carlini <paolo.carlini@oracle.com> + + * testsuite/22_locale/time_get/get_monthname/char/6.cc: Use an int + as loop variable, to avoid -Wall warnings. + * testsuite/22_locale/time_get/get_monthname/wchar_t/6.cc: Likewise. + * testsuite/22_locale/time_get/get_weekday/char/6.cc: Likewise. + * testsuite/22_locale/time_get/get_weekday/wchar_t/6.cc: Likewise. + * testsuite/22_locale/time_get/get_weekday/char/38081-2.cc: Likewise. + + * testsuite/20_util/reference_wrapper/24803.cc: Remove unused vars. + * testsuite/20_util/reference_wrapper/invoke.cc: Likewise. + 2010-01-22 Daniel Frey <d.frey@gmx.de> * include/std/functional (_Index_tuple, _Build_index_tuple): diff --git a/libstdc++-v3/testsuite/20_util/reference_wrapper/24803.cc b/libstdc++-v3/testsuite/20_util/reference_wrapper/24803.cc index fcffd9d..598c5c8 100644 --- a/libstdc++-v3/testsuite/20_util/reference_wrapper/24803.cc +++ b/libstdc++-v3/testsuite/20_util/reference_wrapper/24803.cc @@ -46,27 +46,25 @@ void verify_return_type(T, T) void test01() { - test_type* null_tt = 0; - const test_type* null_ttc = 0; - int zero; + int zero; - std::reference_wrapper<double (int)>* pr1(0); - verify_return_type((*pr1)(0), double()); - std::reference_wrapper<double (*)(int)>* pr2(0); - verify_return_type((*pr2)(0), double()); - std::reference_wrapper<functor1>* pr5(0); + std::reference_wrapper<double (int)>* pr1(0); + verify_return_type((*pr1)(0), double()); + std::reference_wrapper<double (*)(int)>* pr2(0); + verify_return_type((*pr2)(0), double()); + std::reference_wrapper<functor1>* pr5(0); - // libstdc++/24803 - verify_return_type((*pr5)(0), double()); - verify_return_type((*pr5)(zero), double()); + // libstdc++/24803 + verify_return_type((*pr5)(0), double()); + verify_return_type((*pr5)(zero), double()); - std::reference_wrapper<double (int, char)>* pr1b(0); - verify_return_type((*pr1b)(0,0), double()); - std::reference_wrapper<double (*)(int, char)>* pr2b(0); - verify_return_type((*pr2b)(0,0), double()); - std::reference_wrapper<functor2>* pr5b(0); + std::reference_wrapper<double (int, char)>* pr1b(0); + verify_return_type((*pr1b)(0, 0), double()); + std::reference_wrapper<double (*)(int, char)>* pr2b(0); + verify_return_type((*pr2b)(0, 0), double()); + std::reference_wrapper<functor2>* pr5b(0); - // libstdc++/24803 - verify_return_type((*pr5b)(0,0), double()); - verify_return_type((*pr5b)(zero,zero), double()); + // libstdc++/24803 + verify_return_type((*pr5b)(0, 0), double()); + verify_return_type((*pr5b)(zero, zero), double()); } diff --git a/libstdc++-v3/testsuite/20_util/reference_wrapper/invoke.cc b/libstdc++-v3/testsuite/20_util/reference_wrapper/invoke.cc index ba72b97..b371f1c 100644 --- a/libstdc++-v3/testsuite/20_util/reference_wrapper/invoke.cc +++ b/libstdc++-v3/testsuite/20_util/reference_wrapper/invoke.cc @@ -69,7 +69,6 @@ void test01() ::get_seventeen get_sev; ::X x; - ::X* xp = &x; const float pi = 3.14; diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/6.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/6.cc index 7a79887..2083db6 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/6.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/6.cc @@ -53,7 +53,7 @@ void test01() const char* amname[12] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; - for (unsigned i = 0; i < 12; ++i) + for (int i = 0; i < 12; ++i) { iss.str(amname[i]); iterator_type is_it01(iss); @@ -69,7 +69,7 @@ void test01() "May", "June", "July", "August", "September", "October", "November", "December" }; - for (unsigned i = 0; i < 12; ++i) + for (int i = 0; i < 12; ++i) { iss.str(mname[i]); iterator_type is_it01(iss); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/6.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/6.cc index 41742cd..7f9f47f 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/6.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/6.cc @@ -55,7 +55,7 @@ void test01() L"May", L"Jun", L"Jul", L"Aug", L"Sep", L"Oct", L"Nov", L"Dec" }; - for (unsigned i = 0; i < 12; ++i) + for (int i = 0; i < 12; ++i) { iss.str(amname[i]); iterator_type is_it01(iss); @@ -72,7 +72,7 @@ void test01() L"July", L"August", L"September", L"October", L"November", L"December" }; - for (unsigned i = 0; i < 12; ++i) + for (int i = 0; i < 12; ++i) { iss.str(mname[i]); iterator_type is_it01(iss); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/38081-2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/38081-2.cc index decec58..cda8df1 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/38081-2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/38081-2.cc @@ -58,7 +58,7 @@ void test01() "\u041F\u0442\u043D", "\u0421\u0431\u0442" }; - for (unsigned i = 0; i < 7; ++i) + for (int i = 0; i < 7; ++i) { iss.str(awdays[i]); iterator_type is_it01(iss); @@ -80,7 +80,7 @@ void test01() "\u041F\u044F\u0442\u043D\u0438\u0446\u0430", "\u0421\u0443\u0431\u0431\u043E\u0442\u0430" }; - for (unsigned i = 0; i < 7; ++i) + for (int i = 0; i < 7; ++i) { iss.str(wdays[i]); iterator_type is_it01(iss); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/6.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/6.cc index 595c81c..1d28dbf 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/6.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/6.cc @@ -52,7 +52,7 @@ void test01() const char* awdays[7] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }; - for (unsigned i = 0; i < 7; ++i) + for (int i = 0; i < 7; ++i) { iss.str(awdays[i]); iterator_type is_it01(iss); @@ -67,7 +67,7 @@ void test01() const char* wdays[7] = { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" }; - for (unsigned i = 0; i < 7; ++i) + for (int i = 0; i < 7; ++i) { iss.str(wdays[i]); iterator_type is_it01(iss); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/6.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/6.cc index d4af7b1..39a3e3d 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/6.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/6.cc @@ -54,7 +54,7 @@ void test01() const wchar_t* awdays[7] = { L"Sun", L"Mon", L"Tue", L"Wed", L"Thu", L"Fri", L"Sat" }; - for (unsigned i = 0; i < 7; ++i) + for (int i = 0; i < 7; ++i) { iss.str(awdays[i]); iterator_type is_it01(iss); @@ -69,7 +69,7 @@ void test01() const wchar_t* wdays[7] = { L"Sunday", L"Monday", L"Tuesday", L"Wednesday", L"Thursday", L"Friday", L"Saturday" }; - for (unsigned i = 0; i < 7; ++i) + for (int i = 0; i < 7; ++i) { iss.str(wdays[i]); iterator_type is_it01(iss); |