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 warnings -Wunused-variable in release #4418

Merged

Conversation

mspang
Copy link
Contributor

@mspang mspang commented Jan 19, 2021

This fixes the following warning in release builds:

src/lib/support/Pool.cpp:69:10: error: unused variable 'value' [-Werror,-Wunused-variable]
    auto value = mUsage[word].fetch_and(~(kBit1 << offset));

Switch to nlassert since this macro doesn't cause unused variable
warnings when assertions are disabled.

This fixes the following warning in release

src/lib/support/Pool.cpp:69:10: error: unused variable 'value' [-Werror,-Wunused-variable]
    auto value = mUsage[word].fetch_and(~(kBit1 << offset));

Switch to nlassert since this macro doesn't cause unused variable
warnings when assertions are disabled.
@rwalker-apple rwalker-apple merged commit 05a589c into project-chip:master Jan 20, 2021
@mspang mspang deleted the for-chip/assert-unused-variable branch April 2, 2021 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants