mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 23:09:44 -04:00
Merge bitcoin/bitcoin#24729: util/check: avoid unused parameter warnings
0add4dbadb
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 ACK0add4dbadb
jonatack: ACK0add4dbadb
review and debug build on clang 15 shaavan: ACK0add4dbadb
Tree-SHA512: 3ba490d74d91692c1d22b927da43a130c92cd6a20ed168573e4fbe1f4675fef7e05ebf0b11f2bbd15da3c606fea1f8e6403cfca347009b8b6acc1e77bbee9963
This commit is contained in:
commit
4faf7a1d86
1 changed files with 1 additions and 1 deletions
|
@ -51,7 +51,7 @@ void assertion_fail(const char* file, int line, const char* func, const char* as
|
||||||
|
|
||||||
/** Helper for Assert()/Assume() */
|
/** Helper for Assert()/Assume() */
|
||||||
template <bool IS_ASSERT, typename T>
|
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
|
if constexpr (IS_ASSERT
|
||||||
#ifdef ABORT_ON_FAILED_ASSUME
|
#ifdef ABORT_ON_FAILED_ASSUME
|
||||||
|
|
Loading…
Add table
Reference in a new issue