diff --git a/test/src/unit-allocator.cpp b/test/src/unit-allocator.cpp index df03249ae..68a371069 100644 --- a/test/src/unit-allocator.cpp +++ b/test/src/unit-allocator.cpp @@ -114,6 +114,7 @@ struct my_allocator : std::allocator { if (next_destroy_fails) { + (void)p; // Ignored unused next_destroy_fails = false; throw std::bad_alloc(); } diff --git a/test/src/unit-udt.cpp b/test/src/unit-udt.cpp index 7f74ac5f8..7e5d1066e 100644 --- a/test/src/unit-udt.cpp +++ b/test/src/unit-udt.cpp @@ -817,7 +817,9 @@ class Evil public: Evil() = default; template - Evil(T t) : m_i(sizeof(t)) {} + Evil(T t) : m_i(sizeof(t)) { + (void)t; // Ignored unused + } int m_i = 0; };