Skip to content

fix compiler warnings for CPP tests#6124

Merged
jameslamb merged 3 commits intomasterfrom
test-warnings
Oct 6, 2023
Merged

fix compiler warnings for CPP tests#6124
jameslamb merged 3 commits intomasterfrom
test-warnings

Conversation

@jameslamb
Copy link
Collaborator

The C++ tests currently raise the following compiler warnings with clang 11:

tests/cpp_tests/test_byte_buffer.cpp:33:21: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
  for (int i = 0; i < sizeof(int16_t); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~
tests/cpp_tests/test_byte_buffer.cpp:44:21: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
  for (int i = 0; i < sizeof(int64_t); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~
tests/cpp_tests/test_byte_buffer.cpp:55:21: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
  for (int i = 0; i < sizeof(double); i++) {
  

tests/cpp_tests/testutils.cpp:268:25: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
      threads.push_back(move(th));

(build link)

This PR fixes them.

@jameslamb jameslamb marked this pull request as ready for review October 4, 2023 01:36
@jameslamb jameslamb merged commit 8f577de into master Oct 6, 2023
@jameslamb jameslamb deleted the test-warnings branch October 6, 2023 17:11
Ten0 pushed a commit to Ten0/LightGBM that referenced this pull request Jan 12, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2024

This pull request has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants