Repository navigation
Conversation
fanquake
force-pushed
the
more_maybe_unused
branch
from
September 16, 2026 15:01
97a186c to
1d17d7d
Compare
Member
Author
|
Split the constexpr change into #105. |
fanquake
force-pushed
the
more_maybe_unused
branch
from
September 16, 2026 20:12
1d17d7d to
8f99761
Compare
fanquake
force-pushed
the
more_maybe_unused
branch
from
November 3, 2026 15:47
8f99761 to
8dfb490
Compare
Member
Author
|
I see the build failure here is correct. Fixing up. |
fanquake
force-pushed
the
more_maybe_unused
branch
from
November 3, 2026 15:54
8dfb490 to
ab0f8cc
Compare
Member
Author
|
Rebased over #106 and fixed the build issue. |
hodlinator
approved these changes
Nov 4, 2026
hodlinator
left a comment
There was a problem hiding this comment.
ACK ab0f8cc
Tested building PR base with unused-parameter warnings enabled:
cmake -B build -DCMAKE_CXX_FLAGS="-g -O2 -Werror=unused-parameter" && cmake --build build -j
...
In file included from /home/hodlinator/minisketch/src/fields/generic_5bytes.cpp:12:
In file included from /home/hodlinator/minisketch/src/fields/generic_common_impl.h:12:
/home/hodlinator/minisketch/src/fields/../int_utils.h:242:44: error: unused parameter 'a' [-Werror,-Wunused-parameter]
242 | static inline constexpr I Run(const I& a, const I& b) { return I(0); }
| ^
/home/hodlinator/minisketch/src/fields/../int_utils.h:242:56: error: unused parameter 'b' [-Werror,-Wunused-parameter]
242 | static inline constexpr I Run(const I& a, const I& b) { return I(0); }
| ^
Also tested on PR head with this diff applied:
--- a/src/fields/clmul_1byte.cpp
+++ b/src/fields/clmul_1byte.cpp
@@ -83,14 +83,8 @@ typedef Field<uint8_t, 8, 27, StatTable8, &SQR_TABLE_8, &SQR2_TABLE_8, &QRT_TABL
#endif
}
-Sketch* ConstructClMul1Byte(int bits, MAYBE_UNUSED int implementation) {
+Sketch* ConstructClMul1Byte(int bits, int implementation) {
switch (bits) {
-#ifdef ENABLE_FIELD_INT_5
- case 5: return new SketchImpl<Field5>(implementation, 5);
-#endif
-#ifdef ENABLE_FIELD_INT_8
- case 8: return new SketchImpl<Field8>(implementation, 8);
-#endif
}
return nullptr;
}which results in:
/home/hodlinator/minisketch/src/fields/clmul_1byte.cpp:86:43: error: unused parameter 'implementation' [-Werror,-Wunused-parameter]
86 | Sketch* ConstructClMul1Byte(int bits, int implementation) {
| ^
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This would be useful downstream, see bitcoin/bitcoin#36167.