Skip to content

Commit 4faf7a1

Browse files
author
MarcoFalke
committed
Merge bitcoin/bitcoin#24729: util/check: avoid unused parameter warnings
0add4db 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 0add4db jonatack: ACK 0add4db review and debug build on clang 15 shaavan: ACK 0add4db Tree-SHA512: 3ba490d74d91692c1d22b927da43a130c92cd6a20ed168573e4fbe1f4675fef7e05ebf0b11f2bbd15da3c606fea1f8e6403cfca347009b8b6acc1e77bbee9963
2 parents 6348bc6 + 0add4db commit 4faf7a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util/check.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ void assertion_fail(const char* file, int line, const char* func, const char* as
5151

5252
/** Helper for Assert()/Assume() */
5353
template <bool IS_ASSERT, typename T>
54-
T&& inline_assertion_check(T&& val, const char* file, int line, const char* func, const char* assertion)
54+
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)
5555
{
5656
if constexpr (IS_ASSERT
5757
#ifdef ABORT_ON_FAILED_ASSUME

0 commit comments

Comments
 (0)