# HG changeset patch # User Mike Becker # Date 1650285341 -7200 # Node ID b91c50d023f44c5949fa72c585a6991a4554d4ab # Parent e5dc54131d559fc1d5a206a2736a82e8940ef86d add [[maybe_unused]] attributed to params of mocked function diff -r e5dc54131d55 -r b91c50d023f4 test/CMakeLists.txt --- a/test/CMakeLists.txt Sat Apr 16 22:12:47 2022 +0200 +++ b/test/CMakeLists.txt Mon Apr 18 14:35:41 2022 +0200 @@ -1,5 +1,5 @@ # Load Google Test Framework -set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD 17) include(FetchContent) FetchContent_Declare( diff -r e5dc54131d55 -r b91c50d023f4 test/test_allocator.cpp --- a/test/test_allocator.cpp Sat Apr 16 22:12:47 2022 +0200 +++ b/test/test_allocator.cpp Mon Apr 18 14:35:41 2022 +0200 @@ -76,7 +76,11 @@ TEST(Allocator, FailingReallocate) { // Mock an allocator that always returns nullptr on realloc cx_allocator_class mock_cl; - mock_cl.realloc = [](void* p, void* d, size_t n) -> void* { return nullptr; }; + mock_cl.realloc = []( + [[maybe_unused]]void *p, + [[maybe_unused]]void *d, + [[maybe_unused]]size_t n + ) -> void * { return nullptr; }; cx_allocator_s mock{&mock_cl, nullptr}; void *test = calloc(8, 1);