From 077122629cb7e59500ca45561b7c6f7b62834f23 Mon Sep 17 00:00:00 2001 From: Thomas Braun Date: Tue, 7 Jul 2020 22:53:34 +0200 Subject: [PATCH] unit-allocator.cpp: Silence compiler warning on MSVC 2015 --- test/src/unit-allocator.cpp | 1 + test/src/unit-udt.cpp | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) 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; };