diff options
Diffstat (limited to 'libstdc++-v3/testsuite/26_numerics')
10 files changed, 20 insertions, 20 deletions
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; |