From 15f80f72342b7f8dcf24dd27fdc0d10c92f86914 Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Sun, 16 Jan 2022 23:32:27 -0800 Subject: [PATCH] MathUtil: Mark lo in SaturatingCast as [[maybe_unused]] It's unused in the case that T is unsigned and dest is signed (e.g. SaturatingCast which appears SetIsoPaths in MainSettings.cpp) --- Source/Core/Common/MathUtil.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/Common/MathUtil.h b/Source/Core/Common/MathUtil.h index 9b31a9acd5..4f3af04dc5 100644 --- a/Source/Core/Common/MathUtil.h +++ b/Source/Core/Common/MathUtil.h @@ -37,7 +37,7 @@ constexpr Dest SaturatingCast(T value) { static_assert(std::is_integral()); - constexpr Dest lo = std::numeric_limits::lowest(); + [[maybe_unused]] constexpr Dest lo = std::numeric_limits::lowest(); constexpr Dest hi = std::numeric_limits::max(); // T being a signed integer and Dest unsigned is a problematic case because the value will