Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warnings from clang-12 in tests #215

Open
yurivict opened this issue Nov 26, 2021 · 1 comment
Open

warnings from clang-12 in tests #215

yurivict opened this issue Nov 26, 2021 · 1 comment

Comments

@yurivict
Copy link

/disk-samsung/freebsd-ports/math/xtensor-blas/work/xtensor-blas-0.20.0/test/test_lapack.cpp:166:40: warning: implicit conversion changes signedness: 'int' to 'xt::xaccessible<xt::xarray_container<xt::uvector<double>, xt::layout_type::column_major, xt::svector<unsigned long, 4, std::allocator<unsigned long>, true>>>::size_type' (aka 'unsigned long') [-Wsign-conversion]
          EXPECT_NEAR(x_expected[i], x[i], 5e-16);
                                     ~ ^
/usr/local/include/gtest/gtest.h:2162:29: note: expanded from macro 'EXPECT_NEAR'
                      val1, val2, abs_error)
                            ^~~~
/usr/local/include/gtest/gtest_pred_impl.h:219:40: note: expanded from macro 'EXPECT_PRED_FORMAT3'
  GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, GTEST_NONFATAL_FAILURE_)
                                       ^~
/usr/local/include/gtest/gtest_pred_impl.h:202:48: note: expanded from macro 'GTEST_PRED_FORMAT3_'
  GTEST_ASSERT_(pred_format(#v1, #v2, #v3, v1, v2, v3), \
                                               ^~
/usr/local/include/gtest/gtest_pred_impl.h:77:52: note: expanded from macro 'GTEST_ASSERT_'
  if (const ::testing::AssertionResult gtest_ar = (expression)) \
                                                   ^~~~~~~~~~
/disk-samsung/freebsd-ports/math/xtensor-blas/work/xtensor-blas-0.20.0/test/test_lapack.cpp:166:34: warning: implicit conversion changes signedness: 'int' to 'xt::xconst_accessible<xt::xarray_container<xt::uvector<double>, xt::layout_type::row_major, xt::svector<unsigned long, 4, std::allocator<unsigned long>, true>>>::size_type' (aka 'unsigned long') [-Wsign-conversion]
          EXPECT_NEAR(x_expected[i], x[i], 5e-16);
                      ~~~~~~~~~~ ^
/usr/local/include/gtest/gtest.h:2162:23: note: expanded from macro 'EXPECT_NEAR'
                      val1, val2, abs_error)
                      ^~~~
/usr/local/include/gtest/gtest_pred_impl.h:219:36: note: expanded from macro 'EXPECT_PRED_FORMAT3'
  GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, GTEST_NONFATAL_FAILURE_)
                                   ^~
/usr/local/include/gtest/gtest_pred_impl.h:202:44: note: expanded from macro 'GTEST_PRED_FORMAT3_'
  GTEST_ASSERT_(pred_format(#v1, #v2, #v3, v1, v2, v3), \
                                           ^~
/usr/local/include/gtest/gtest_pred_impl.h:77:52: note: expanded from macro 'GTEST_ASSERT_'
  if (const ::testing::AssertionResult gtest_ar = (expression)) \
                                                   ^~~~~~~~~~
/disk-samsung/freebsd-ports/math/xtensor-blas/work/xtensor-blas-0.20.0/test/test_lapack.cpp:165:27: warning: comparison of integers of different signs: 'int' and 'const xt::svector<unsigned long, 4, std::allocator<unsigned long>, true>::value_type' (aka 'const unsigned long') [-Wsign-compare]
        for (int i = 0; i < x_expected.shape()[0]; ++i) {
                        ~ ^ ~~~~~~~~~~~~~~~~~~~~~
/disk-samsung/freebsd-ports/math/xtensor-blas/work/xtensor-blas-0.20.0/test/test_lapack.cpp:186:45: warning: implicit conversion changes signedness: 'int' to 'xt::xaccessible<xt::xtensor_container<xt::uvector<double>, 1, xt::layout_type::column_major>>::size_type' (aka 'unsigned long') [-Wsign-conversion]
          EXPECT_DOUBLE_EQ(x_expected[i], x[i]);
                                          ~ ^
/usr/local/include/gtest/gtest.h:2150:29: note: expanded from macro 'EXPECT_DOUBLE_EQ'
                      val1, val2)
                            ^~~~
/usr/local/include/gtest/gtest_pred_impl.h:164:40: note: expanded from macro 'EXPECT_PRED_FORMAT2'
  GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_NONFATAL_FAILURE_)
                                       ^~
/usr/local/include/gtest/gtest_pred_impl.h:149:43: note: expanded from macro 'GTEST_PRED_FORMAT2_'
  GTEST_ASSERT_(pred_format(#v1, #v2, v1, v2), \
                                          ^~
/usr/local/include/gtest/gtest_pred_impl.h:77:52: note: expanded from macro 'GTEST_ASSERT_'
  if (const ::testing::AssertionResult gtest_ar = (expression)) \
                                                   ^~~~~~~~~~
/disk-samsung/freebsd-ports/math/xtensor-blas/work/xtensor-blas-0.20.0/test/test_lapack.cpp:186:39: warning: implicit conversion changes signedness: 'int' to 'xt::xconst_accessible<xt::xarray_container<xt::uvector<double>, xt::layout_type::row_major, xt::svector<unsigned long, 4, std::allocator<unsigned long>, true>>>::size_type' (aka 'unsigned long') [-Wsign-conversion]
          EXPECT_DOUBLE_EQ(x_expected[i], x[i]);
                           ~~~~~~~~~~ ^
/usr/local/include/gtest/gtest.h:2150:23: note: expanded from macro 'EXPECT_DOUBLE_EQ'
                      val1, val2)
                      ^~~~
/usr/local/include/gtest/gtest_pred_impl.h:164:36: note: expanded from macro 'EXPECT_PRED_FORMAT2'
  GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_NONFATAL_FAILURE_)
                                   ^~
/usr/local/include/gtest/gtest_pred_impl.h:149:39: note: expanded from macro 'GTEST_PRED_FORMAT2_'
  GTEST_ASSERT_(pred_format(#v1, #v2, v1, v2), \
                                      ^~
/usr/local/include/gtest/gtest_pred_impl.h:77:52: note: expanded from macro 'GTEST_ASSERT_'
  if (const ::testing::AssertionResult gtest_ar = (expression)) \
                                                   ^~~~~~~~~~
/disk-samsung/freebsd-ports/math/xtensor-blas/work/xtensor-blas-0.20.0/test/test_lapack.cpp:185:27: warning: comparison of integers of different signs: 'int' and 'const xt::svector<unsigned long, 4, std::allocator<unsigned long>, true>::value_type' (aka 'const unsigned long') [-Wsign-compare]
        for (int i = 0; i < x_expected.shape()[0]; ++i) {
                        ~ ^ ~~~~~~~~~~~~~~~~~~~~~
6 warnings generated.
@james-d-mitchell
Copy link
Contributor

I think this was resolved by #226, maybe be good to close the issue? @SylvainCorlay @JohanMabille @wolfv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants