From 21567894a547ae87b290cb1b002eafd3135f398c Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Tue, 29 Apr 2025 15:29:32 +0200 Subject: [PATCH] Avoid unused variable warning in test --- test/test_mock.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test_mock.cpp b/test/test_mock.cpp index eb4b562..6ca5c52 100644 --- a/test/test_mock.cpp +++ b/test/test_mock.cpp @@ -365,6 +365,7 @@ void instantiate_class() { variadic inst; // If this compiles all pure virtual methods were mocked const variadic& cinst = inst; + (void)cinst; // Avoid unused variable warning static_assert(noexcept(inst.m12()), "noexcept should be kept"); static_assert(!noexcept(inst.m14()), "noexcept should not be set"); static_assert(noexcept(cinst.m14(1)), "noexcept should be kept");