Merge bitcoin/bitcoin#35982: Update minisketch subtree to latest master

461e3be8d3 Squashed 'src/minisketch/' changes from d1bd01e189..4a179c61e3 (fanquake)

Pull request description:

  Includes:
  * https://github.com/bitcoin-core/minisketch/pull/102

ACKs for top commit:
  hebasto:
    ACK 2dcb2c6df2.

Tree-SHA512: 295e217cb6d32e8d0bb4ea84bd0d6682f98735029c659ad06a6c588fa2865176d80adfca32a1a3a339ffb601e5d1cc99c81266914225e27726a8a859fee3549e
This commit is contained in:
merge-script
2026-08-17 09:51:28 +01:00
2 changed files with 17 additions and 2 deletions

View File

@@ -12,6 +12,7 @@
#include "../int_utils.h"
#include "../lintrans.h"
#include "../util.h"
namespace {
@@ -28,7 +29,7 @@ namespace {
# define NO_SANITIZE_MEMORY
#endif
template<typename I, int BITS, I MOD> NO_SANITIZE_MEMORY I MulWithClMulReduce(I a, I b)
template<typename I, int BITS, I MOD> NO_SANITIZE_MEMORY MAYBE_UNUSED I MulWithClMulReduce(I a, I b)
{
static constexpr I MASK = Mask<BITS, I>();
@@ -65,7 +66,7 @@ template<typename I, int BITS, I MOD> NO_SANITIZE_MEMORY I MulWithClMulReduce(I
}
}
template<typename I, int BITS, int POS> NO_SANITIZE_MEMORY I MulTrinomial(I a, I b)
template<typename I, int BITS, int POS> NO_SANITIZE_MEMORY MAYBE_UNUSED I MulTrinomial(I a, I b)
{
static constexpr I MASK = Mask<BITS, I>();

View File

@@ -26,6 +26,20 @@
#define EXPECT(x,c) (x)
#endif
#if defined(__has_cpp_attribute)
# if __has_cpp_attribute(maybe_unused)
# define MAYBE_UNUSED [[maybe_unused]]
# endif
#endif
#ifndef MAYBE_UNUSED
# if defined(__GNUC__)
# define MAYBE_UNUSED __attribute__((unused))
# else
# define MAYBE_UNUSED
# endif
#endif
/* Assertion macros */
/**