Skip to content
Merged
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
ef115ee
Wextra
vinay-deshmukh Mar 30, 2025
555a99f
unused
vinay-deshmukh Mar 30, 2025
21530d5
unused
vinay-deshmukh Mar 30, 2025
283dac9
unused
vinay-deshmukh Mar 30, 2025
05ef005
unused
vinay-deshmukh Mar 30, 2025
cf7aeba
unused
vinay-deshmukh Apr 2, 2025
bf8471d
unused
vinay-deshmukh Apr 2, 2025
6244b9f
[[maybe_unused]]
vinay-deshmukh Apr 2, 2025
7ae6b90
unused
vinay-deshmukh Apr 2, 2025
6447e76
unused
vinay-deshmukh Apr 2, 2025
3a2968d
unused
vinay-deshmukh Apr 2, 2025
a2cd02a
unused
vinay-deshmukh Apr 2, 2025
c01ad0b
[[maybe_unused]]
vinay-deshmukh Apr 2, 2025
c018d53
unused
vinay-deshmukh Apr 2, 2025
92d1f5f
unused
vinay-deshmukh Apr 2, 2025
aa69cb2
unused
vinay-deshmukh Apr 2, 2025
768cb89
unused
vinay-deshmukh Apr 2, 2025
1e82924
unused
vinay-deshmukh Apr 2, 2025
43da992
unused
vinay-deshmukh Apr 2, 2025
3661bca
unused
vinay-deshmukh Apr 2, 2025
7d6cfdd
unused
vinay-deshmukh Apr 2, 2025
c9a5b55
unused
vinay-deshmukh Apr 2, 2025
2fa2f09
unused
vinay-deshmukh Apr 2, 2025
ffca61e
Merge remote-tracking branch 'upstream/main' into vinay-issue-119281-…
vinay-deshmukh Apr 16, 2025
983eab7
remove werror
vinay-deshmukh Apr 17, 2025
b9f3af5
empty
vinay-deshmukh Apr 17, 2025
0e4c6e9
Merge remote-tracking branch 'upstream/main' into vinay-issue-119281-…
vinay-deshmukh Apr 17, 2025
d895d96
Revert "remove werror"
vinay-deshmukh Apr 17, 2025
95e1bd2
fix buildkit
vinay-deshmukh Apr 18, 2025
2a8d0ee
buildkit
vinay-deshmukh Apr 18, 2025
06111d2
remove werror
vinay-deshmukh Apr 18, 2025
fd26016
Merge remote-tracking branch 'upstream/main' into vinay-issue-119281-…
vinay-deshmukh Apr 18, 2025
38b927c
All [[maybe_unused]]
vinay-deshmukh Jul 1, 2025
a2e4f26
Merge branch 'main' into vinay-issue-119281-wextra
vinay-deshmukh Jul 4, 2025
34accca
Merge branch 'main' into vinay-issue-119281-wextra
vinay-deshmukh Jul 28, 2025
7155fd7
Merge branch 'main' into vinay-issue-119281-wextra
vinay-deshmukh Aug 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libc/cmake/modules/LLVMLibCTestRules.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function(_get_common_test_compile_options output_var c_test flags)
endif()

# list(APPEND compile_options "-Wall")
# list(APPEND compile_options "-Wextra")
list(APPEND compile_options "-Wextra")
# -DLIBC_WNO_ERROR=ON if you can't build cleanly with -Werror.
if(NOT LIBC_WNO_ERROR)
# list(APPEND compile_options "-Werror")
Expand Down
2 changes: 1 addition & 1 deletion libc/test/UnitTest/FPExceptMatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace testing {
static thread_local sigjmp_buf jumpBuffer;
static thread_local bool caughtExcept;

static void sigfpeHandler(int sig) {
static void sigfpeHandler([[maybe_unused]] int sig) {
caughtExcept = true;
siglongjmp(jumpBuffer, -1);
}
Expand Down
2 changes: 1 addition & 1 deletion libc/test/UnitTest/FPExceptMatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class FPExceptMatcher : public Matcher<bool> {
// Takes ownership of func.
explicit FPExceptMatcher(FunctionCaller *func);

bool match(bool unused) { return exceptionRaised; }
bool match([[maybe_unused]] bool unused) { return exceptionRaised; }

void explainError() override {
tlog << "A floating point exception should have been raised but it "
Expand Down
17 changes: 12 additions & 5 deletions libc/test/UnitTest/HermeticTestUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ int atexit(void (*func)(void));
// add_libc_hermetic_test properly. Such that they won't get correct linkage
// against the object containing this function. We create a dummy function that
// always returns 0 to indicate a failure.
[[gnu::weak]] unsigned long getauxval(unsigned long id) { return 0; }
[[gnu::weak]] unsigned long getauxval([[maybe_unused]] unsigned long id) {
return 0;
}

} // namespace LIBC_NAMESPACE_DECL

Expand Down Expand Up @@ -124,7 +126,7 @@ unsigned long __getauxval(unsigned long id) {

} // extern "C"

void *operator new(size_t size, void *ptr) { return ptr; }
void *operator new([[maybe_unused]] size_t size, void *ptr) { return ptr; }

void *operator new(size_t size) { return malloc(size); }

Expand All @@ -136,7 +138,9 @@ void operator delete(void *) {
__builtin_trap();
}

void operator delete(void *ptr, size_t size) { __builtin_trap(); }
void operator delete([[maybe_unused]] void *ptr, [[maybe_unused]] size_t size) {
__builtin_trap();
}

// Defining members in the std namespace is not preferred. But, we do it here
// so that we can use it to define the operator new which takes std::align_val_t
Expand All @@ -145,8 +149,11 @@ namespace std {
enum class align_val_t : size_t {};
} // namespace std

void operator delete(void *mem, std::align_val_t) noexcept { __builtin_trap(); }
void operator delete([[maybe_unused]] void *mem, std::align_val_t) noexcept {
__builtin_trap();
}

void operator delete(void *mem, unsigned int, std::align_val_t) noexcept {
void operator delete([[maybe_unused]] void *mem, unsigned int,
std::align_val_t) noexcept {
__builtin_trap();
}
3 changes: 2 additions & 1 deletion libc/test/UnitTest/LibcDeathTestExecutors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ namespace LIBC_NAMESPACE_DECL {
namespace testing {

bool Test::testProcessKilled(testutils::FunctionCaller *Func, int Signal,
const char *LHSStr, const char *RHSStr,
const char *LHSStr,
[[maybe_unused]] const char *RHSStr,
internal::Location Loc) {
testutils::ProcessStatus Result =
testutils::invoke_in_subprocess(Func, TIMEOUT_MS);
Expand Down
2 changes: 1 addition & 1 deletion libc/test/UnitTest/LibcTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ struct Message {
// A trivial object to catch the Message, this enables custom logging and
// returning from the test function, see LIBC_TEST_SCAFFOLDING_ below.
struct Failure {
void operator=(Message msg) {}
void operator=([[maybe_unused]] Message msg) {}
};

struct RunContext {
Expand Down
70 changes: 49 additions & 21 deletions libc/test/include/stdbit_stub.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,21 @@
#include <stdbool.h> // bool in C

#define STDBIT_STUB_FUNCTION(FUNC_NAME, LEADING_VAL) \
unsigned FUNC_NAME##_uc(unsigned char x) { return LEADING_VAL##AU; } \
unsigned FUNC_NAME##_us(unsigned short x) { return LEADING_VAL##BU; } \
unsigned FUNC_NAME##_ui(unsigned int x) { return LEADING_VAL##CU; } \
unsigned FUNC_NAME##_ul(unsigned long x) { return LEADING_VAL##DU; } \
unsigned FUNC_NAME##_ull(unsigned long long x) { return LEADING_VAL##EU; }
unsigned FUNC_NAME##_uc([[maybe_unused]] unsigned char x) { \
return LEADING_VAL##AU; \
} \
unsigned FUNC_NAME##_us([[maybe_unused]] unsigned short x) { \
return LEADING_VAL##BU; \
} \
unsigned FUNC_NAME##_ui([[maybe_unused]] unsigned int x) { \
return LEADING_VAL##CU; \
} \
unsigned FUNC_NAME##_ul([[maybe_unused]] unsigned long x) { \
return LEADING_VAL##DU; \
} \
unsigned FUNC_NAME##_ull([[maybe_unused]] unsigned long long x) { \
return LEADING_VAL##EU; \
}

__BEGIN_C_DECLS

Expand All @@ -36,24 +46,42 @@ STDBIT_STUB_FUNCTION(stdc_first_trailing_one, 0x1)
STDBIT_STUB_FUNCTION(stdc_count_zeros, 0x2)
STDBIT_STUB_FUNCTION(stdc_count_ones, 0x3)

bool stdc_has_single_bit_uc(unsigned char x) { return false; }
bool stdc_has_single_bit_us(unsigned short x) { return false; }
bool stdc_has_single_bit_ui(unsigned x) { return false; }
bool stdc_has_single_bit_ul(unsigned long x) { return false; }
bool stdc_has_single_bit_ull(unsigned long long x) { return false; }
bool stdc_has_single_bit_uc([[maybe_unused]] unsigned char x) { return false; }
bool stdc_has_single_bit_us([[maybe_unused]] unsigned short x) { return false; }
bool stdc_has_single_bit_ui([[maybe_unused]] unsigned x) { return false; }
bool stdc_has_single_bit_ul([[maybe_unused]] unsigned long x) { return false; }
bool stdc_has_single_bit_ull([[maybe_unused]] unsigned long long x) {
return false;
}

STDBIT_STUB_FUNCTION(stdc_bit_width, 0x4)

unsigned char stdc_bit_floor_uc(unsigned char x) { return 0x5AU; }
unsigned short stdc_bit_floor_us(unsigned short x) { return 0x5BU; }
unsigned stdc_bit_floor_ui(unsigned x) { return 0x5CU; }
unsigned long stdc_bit_floor_ul(unsigned long x) { return 0x5DUL; }
unsigned long long stdc_bit_floor_ull(unsigned long long x) { return 0x5EULL; }

unsigned char stdc_bit_ceil_uc(unsigned char x) { return 0x6AU; }
unsigned short stdc_bit_ceil_us(unsigned short x) { return 0x6BU; }
unsigned stdc_bit_ceil_ui(unsigned x) { return 0x6CU; }
unsigned long stdc_bit_ceil_ul(unsigned long x) { return 0x6DUL; }
unsigned long long stdc_bit_ceil_ull(unsigned long long x) { return 0x6EULL; }
unsigned char stdc_bit_floor_uc([[maybe_unused]] unsigned char x) {
return 0x5AU;
}
unsigned short stdc_bit_floor_us([[maybe_unused]] unsigned short x) {
return 0x5BU;
}
unsigned stdc_bit_floor_ui([[maybe_unused]] unsigned x) { return 0x5CU; }
unsigned long stdc_bit_floor_ul([[maybe_unused]] unsigned long x) {
return 0x5DUL;
}
unsigned long long stdc_bit_floor_ull([[maybe_unused]] unsigned long long x) {
return 0x5EULL;
}

unsigned char stdc_bit_ceil_uc([[maybe_unused]] unsigned char x) {
return 0x6AU;
}
unsigned short stdc_bit_ceil_us([[maybe_unused]] unsigned short x) {
return 0x6BU;
}
unsigned stdc_bit_ceil_ui([[maybe_unused]] unsigned x) { return 0x6CU; }
unsigned long stdc_bit_ceil_ul([[maybe_unused]] unsigned long x) {
return 0x6DUL;
}
unsigned long long stdc_bit_ceil_ull([[maybe_unused]] unsigned long long x) {
return 0x6EULL;
}

__END_C_DECLS
4 changes: 2 additions & 2 deletions libc/test/integration/src/pthread/pthread_mutex_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ constexpr int MAX = 10000;
pthread_mutex_t mutex;
static int shared_int = START;

void *counter(void *arg) {
void *counter([[maybe_unused]] void *arg) {
int last_count = START;
while (true) {
LIBC_NAMESPACE::pthread_mutex_lock(&mutex);
Expand Down Expand Up @@ -72,7 +72,7 @@ void relay_counter() {
pthread_mutex_t start_lock, step_lock;
bool started, step;

void *stepper(void *arg) {
void *stepper([[maybe_unused]] void *arg) {
LIBC_NAMESPACE::pthread_mutex_lock(&start_lock);
started = true;
LIBC_NAMESPACE::pthread_mutex_unlock(&start_lock);
Expand Down
3 changes: 2 additions & 1 deletion libc/test/integration/src/spawn/posix_spawn_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ void spawn_and_wait_for_normal_exit(char **envp) {
ASSERT_EQ(exit_status, 0);
}

TEST_MAIN(int argc, char **argv, char **envp) {
TEST_MAIN([[maybe_unused]] int argc, [[maybe_unused]] char **argv,
char **envp) {
spawn_and_wait_for_normal_exit(envp);
return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include <string.h>
#include <unistd.h>

int main(int argc, char **argv) {
int main(int argc, [[maybe_unused]] char **argv) {
if (argc != 1)
return 5;
constexpr size_t bufsize = sizeof(TEXT);
Expand Down
2 changes: 1 addition & 1 deletion libc/test/integration/src/stdio/sprintf_size_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ static int my_strlen(const char *str) {
return static_cast<int>(other - str);
}

TEST_MAIN(int argc, char **argv, char **envp) {
TEST_MAIN(int argc, char **argv, [[maybe_unused]] char **envp) {
ASSERT_EQ(argc, 5);
ASSERT_TRUE(my_streq(argv[1], "%s %c %d"));
ASSERT_EQ(my_strlen(argv[1]), 8);
Expand Down
3 changes: 2 additions & 1 deletion libc/test/integration/src/stdlib/getenv_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ static bool my_streq(const char *lhs, const char *rhs) {
return *l == '\0' && *r == '\0';
}

TEST_MAIN(int argc, char **argv, char **envp) {
TEST_MAIN([[maybe_unused]] int argc, [[maybe_unused]] char **argv,
[[maybe_unused]] char **envp) {
ASSERT_TRUE(
my_streq(LIBC_NAMESPACE::getenv(""), static_cast<char *>(nullptr)));
ASSERT_TRUE(
Expand Down
2 changes: 1 addition & 1 deletion libc/test/integration/src/threads/cnd_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ namespace single_waiter_test {
mtx_t waiter_mtx, main_thread_mtx;
cnd_t waiter_cnd, main_thread_cnd;

int waiter_thread_func(void *unused) {
int waiter_thread_func([[maybe_unused]] void *unused) {
LIBC_NAMESPACE::mtx_lock(&waiter_mtx);

LIBC_NAMESPACE::mtx_lock(&main_thread_mtx);
Expand Down
4 changes: 2 additions & 2 deletions libc/test/integration/src/threads/mtx_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ constexpr int MAX = 10000;
mtx_t mutex;
static int shared_int = START;

int counter(void *arg) {
int counter([[maybe_unused]] void *arg) {
int last_count = START;
while (true) {
LIBC_NAMESPACE::mtx_lock(&mutex);
Expand Down Expand Up @@ -74,7 +74,7 @@ void relay_counter() {
mtx_t start_lock, step_lock;
bool started, step;

int stepper(void *arg) {
int stepper([[maybe_unused]] void *arg) {
LIBC_NAMESPACE::mtx_lock(&start_lock);
started = true;
LIBC_NAMESPACE::mtx_unlock(&start_lock);
Expand Down
3 changes: 2 additions & 1 deletion libc/test/integration/src/unistd/execv_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ void fork_and_execv_signal_exit() {
ASSERT_TRUE(WTERMSIG(status) == SIGUSR1);
}

TEST_MAIN(int argc, char **argv, char **envp) {
TEST_MAIN([[maybe_unused]] int argc, [[maybe_unused]] char **argv,
[[maybe_unused]] char **envp) {
fork_and_execv_normal_exit();
fork_and_execv_signal_exit();
return 0;
Expand Down
3 changes: 2 additions & 1 deletion libc/test/integration/src/unistd/execve_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ void fork_and_execv_signal_exit(char **envp) {
ASSERT_TRUE(WTERMSIG(status) == SIGUSR1);
}

TEST_MAIN(int argc, char **argv, char **envp) {
TEST_MAIN([[maybe_unused]] int argc, [[maybe_unused]] char **argv,
char **envp) {
fork_and_execv_normal_exit(envp);
fork_and_execv_signal_exit(envp);
return 0;
Expand Down
3 changes: 2 additions & 1 deletion libc/test/integration/src/unistd/fork_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ void gettid_test() {
ASSERT_EQ(WEXITSTATUS(status), 0);
}

TEST_MAIN(int argc, char **argv, char **envp) {
TEST_MAIN([[maybe_unused]] int argc, [[maybe_unused]] char **argv,
[[maybe_unused]] char **envp) {
gettid_test();
fork_and_wait_normal_exit();
fork_and_wait4_normal_exit();
Expand Down
3 changes: 2 additions & 1 deletion libc/test/integration/src/unistd/getcwd_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@

using LIBC_NAMESPACE::cpp::string_view;

TEST_MAIN(int argc, char **argv, char **envp) {
TEST_MAIN([[maybe_unused]] int argc, [[maybe_unused]] char **argv,
[[maybe_unused]] char **envp) {
char buffer[1024];
ASSERT_TRUE(string_view(LIBC_NAMESPACE::getenv("PWD")) ==
LIBC_NAMESPACE::getcwd(buffer, 1024));
Expand Down
2 changes: 1 addition & 1 deletion libc/test/integration/startup/linux/main_without_envp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@

#include "test/IntegrationTest/test.h"

TEST_MAIN(int argc, char **argv) { return 0; }
TEST_MAIN([[maybe_unused]] int argc, [[maybe_unused]] char **argv) { return 0; }
3 changes: 2 additions & 1 deletion libc/test/integration/startup/linux/tls_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
constexpr int threadLocalDataSize = 101;
_Thread_local int a[threadLocalDataSize] = {123};

TEST_MAIN(int argc, char **argv, char **envp) {
TEST_MAIN([[maybe_unused]] int argc, [[maybe_unused]] char **argv,
[[maybe_unused]] char **envp) {
ASSERT_TRUE(a[0] == 123);

for (int i = 1; i < threadLocalDataSize; ++i)
Expand Down
3 changes: 2 additions & 1 deletion libc/test/src/__support/CPP/integer_sequence_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ TEST(LlvmLibcIntegerSequencetTest, Basic) {
(is_same_v<ULLSeq, make_integer_sequence<unsigned long long, 4>>));
}

template <typename T, T... Ts> bool checkArray(integer_sequence<T, Ts...> seq) {
template <typename T, T... Ts>
bool checkArray([[maybe_unused]] integer_sequence<T, Ts...> seq) {
T arr[sizeof...(Ts)]{Ts...};

for (T i = 0; i < static_cast<T>(sizeof...(Ts)); i++)
Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/__support/freelist_heap_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ using LIBC_NAMESPACE::cpp::span;
RunTest(*freelist_heap, freelist_heap->region().size()); \
} \
void LlvmLibcFreeListHeapTest##TestCase::RunTest(FreeListHeap &allocator, \
size_t N)
[[maybe_unused]] size_t N)

TEST_FOR_EACH_ALLOCATOR(CanAllocate, 2048) {
constexpr size_t ALLOC_SIZE = 512;
Expand Down
5 changes: 3 additions & 2 deletions libc/test/src/math/exhaustive/hypotf16_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ struct Hypotf16Checker : public virtual LIBC_NAMESPACE::testing::Test {
using FPBits = LIBC_NAMESPACE::fputil::FPBits<float16>;
using StorageType = typename FPBits::StorageType;

uint64_t check(uint16_t x_start, uint16_t x_stop, uint16_t y_start,
uint16_t y_stop, mpfr::RoundingMode rounding) {
uint64_t check(uint16_t x_start, uint16_t x_stop,
[[maybe_unused]] uint16_t y_start, uint16_t y_stop,
mpfr::RoundingMode rounding) {
mpfr::ForceRoundingMode r(rounding);
if (!r.success)
return true;
Expand Down
4 changes: 2 additions & 2 deletions libc/test/src/stdlib/StrfromTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ class StrfromTest : public LIBC_NAMESPACE::testing::Test {
ASSERT_STREQ_LEN(written, buff, "1.0e+01");
}

void floatDecimalExpLongDoublePrec(FunctionT func) {
void floatDecimalExpLongDoublePrec([[maybe_unused]] FunctionT func) {
// Mark as maybe_unused to silence unused variable
// warning when long double is not 80-bit
[[maybe_unused]] char buff[100];
Expand Down Expand Up @@ -422,7 +422,7 @@ class StrfromTest : public LIBC_NAMESPACE::testing::Test {
ASSERT_STREQ_LEN(written, buff, "1.2340000000000000814e-10");
}

void floatDecimalAutoLongDoublePrec(FunctionT func) {
void floatDecimalAutoLongDoublePrec([[maybe_unused]] FunctionT func) {
// Mark as maybe_unused to silence unused variable
// warning when long double is not 80-bit
[[maybe_unused]] char buff[100];
Expand Down
9 changes: 6 additions & 3 deletions libc/test/src/string/memory_utils/op_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ void CopyAdaptor(cpp::span<char> dst, cpp::span<char> src, size_t size) {
FnImpl(as_byte(dst), as_byte(src), size);
}
template <size_t Size, auto FnImpl>
void CopyBlockAdaptor(cpp::span<char> dst, cpp::span<char> src, size_t size) {
void CopyBlockAdaptor(cpp::span<char> dst, cpp::span<char> src,
[[maybe_unused]] size_t size) {
FnImpl(as_byte(dst), as_byte(src));
}

Expand Down Expand Up @@ -153,7 +154,8 @@ void SetAdaptor(cpp::span<char> dst, uint8_t value, size_t size) {
FnImpl(as_byte(dst), value, size);
}
template <size_t Size, auto FnImpl>
void SetBlockAdaptor(cpp::span<char> dst, uint8_t value, size_t size) {
void SetBlockAdaptor(cpp::span<char> dst, uint8_t value,
[[maybe_unused]] size_t size) {
FnImpl(as_byte(dst), value);
}

Expand Down Expand Up @@ -242,7 +244,8 @@ int CmpAdaptor(cpp::span<char> p1, cpp::span<char> p2, size_t size) {
return (int)FnImpl(as_byte(p1), as_byte(p2), size);
}
template <size_t Size, auto FnImpl>
int CmpBlockAdaptor(cpp::span<char> p1, cpp::span<char> p2, size_t size) {
int CmpBlockAdaptor(cpp::span<char> p1, cpp::span<char> p2,
[[maybe_unused]] size_t size) {
return (int)FnImpl(as_byte(p1), as_byte(p2));
}

Expand Down
Loading
Loading