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

resolve two unused warnings in libtester that show up only in release builds #793

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

spoonincode
Copy link
Member

clang18:

/home/spoon/f/leap/src/libraries/testing/tester.cpp:378:25: warning: unused variable '[block, id]' [-Wunused-variable]
  378 |             const auto& [block, id] = t;
      |                         ^
/home/spoon/f/leap/src/libraries/testing/tester.cpp:377:106: warning: lambda capture 'this' is not used [-Wunused-lambda-capture]
  377 |       [[maybe_unused]] auto accepted_block_header_connection = control->accepted_block_header().connect([this](const block_signal_params& t) {
      |                                                                                                          ^~~~

an alternative would be to wrap the 5 lines of this connection in a #ifndef NDEBUG

@spoonincode spoonincode merged commit d916849 into main Sep 17, 2024
36 checks passed
@spoonincode spoonincode deleted the tester_unused_warns branch September 17, 2024 17:22
@ericpassmore
Copy link
Contributor

Note:start
category: Tests
component: Internal
summary: Resolve unused warning in libtester.
Note:end

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

Successfully merging this pull request may close these issues.

4 participants