From 412bd51449244bbb8b9e3467205cdd6b2dc29cc6 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Thu, 27 Oct 2022 02:12:43 +0300 Subject: [PATCH] Avoid -Wunused-but-set-variable under Clang 15 --- test/hash_function_pointer_test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/hash_function_pointer_test.cpp b/test/hash_function_pointer_test.cpp index abc8c4a..eb124d3 100644 --- a/test/hash_function_pointer_test.cpp +++ b/test/hash_function_pointer_test.cpp @@ -14,8 +14,8 @@ #include #include "./compile_time.hpp" -void void_func1() { static int x = 1; ++x; } -void void_func2() { static int x = 2; --x; } +void void_func1() { static int x = 1; ++x; (void)x; } +void void_func2() { static int x = 2; --x; (void)x; } int int_func1(int) { return 0; } int int_func2(int) { return 1; }