diff options
author | MarcoFalke <falke.marco@gmail.com> | 2022-04-04 13:44:07 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2022-04-04 13:44:10 +0200 |
commit | 4faf7a1d86dbdd1741f557c371b24cf681152d4e (patch) | |
tree | 8315d8d72f34b688aa8fb1eac69f1157856b27c9 /src | |
parent | 6348bc61b533705a229f2c2ddcff2bdd98849d07 (diff) | |
parent | 0add4dbadbc972933b0c99813a155a4ed4852975 (diff) | |
download | bitcoin-4faf7a1d86dbdd1741f557c371b24cf681152d4e.tar.xz |
Merge bitcoin/bitcoin#24729: util/check: avoid unused parameter warnings
0add4dbadbc972933b0c99813a155a4ed4852975 util/check: avoid unused parameter warnings (Anthony Towns)
Pull request description:
Add `[[maybe_unused]]` annotations to avoid warnings from gcc 9.4 and earlier which don't analyse `if constexpr` properly.
ACKs for top commit:
MarcoFalke:
review ACK 0add4dbadbc972933b0c99813a155a4ed4852975
jonatack:
ACK 0add4dbadbc972933b0c99813a155a4ed4852975 review and debug build on clang 15
shaavan:
ACK 0add4dbadbc972933b0c99813a155a4ed4852975
Tree-SHA512: 3ba490d74d91692c1d22b927da43a130c92cd6a20ed168573e4fbe1f4675fef7e05ebf0b11f2bbd15da3c606fea1f8e6403cfca347009b8b6acc1e77bbee9963
Diffstat (limited to 'src')
-rw-r--r-- | src/util/check.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/check.h b/src/util/check.h index 80e973e7e2..4ee65c8d34 100644 --- a/src/util/check.h +++ b/src/util/check.h @@ -51,7 +51,7 @@ void assertion_fail(const char* file, int line, const char* func, const char* as /** Helper for Assert()/Assume() */ template <bool IS_ASSERT, typename T> -T&& inline_assertion_check(T&& val, const char* file, int line, const char* func, const char* assertion) +T&& inline_assertion_check(T&& val, [[maybe_unused]] const char* file, [[maybe_unused]] int line, [[maybe_unused]] const char* func, [[maybe_unused]] const char* assertion) { if constexpr (IS_ASSERT #ifdef ABORT_ON_FAILED_ASSUME |