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

fix compiler warnings for CPP tests #6124

Merged
merged 3 commits into from
Oct 6, 2023
Merged

fix compiler warnings for CPP tests #6124

merged 3 commits into from
Oct 6, 2023

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
41 checks passed
@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
Copy link

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