From 678d012c2c3ce7b6bac136576d15f23b2d4b05a8 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 20 Oct 2020 19:24:28 -0400 Subject: [PATCH] video_core: Conditially activate relevant compiler warnings These compiler flags aren't shared with clang, so specifying these flags unconditionally can lead to a bit of warning spam. While we're in the area, we can also enable -Wunused-but-set-parameter given this is almost always a bug. --- src/video_core/CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/video_core/CMakeLists.txt b/src/video_core/CMakeLists.txt index 3df54816d0..77ebac19fc 100644 --- a/src/video_core/CMakeLists.txt +++ b/src/video_core/CMakeLists.txt @@ -278,7 +278,9 @@ else() -Wno-error=sign-conversion -Werror=switch -Werror=unused-variable - -Werror=unused-but-set-variable - -Werror=class-memaccess + + $<$:-Werror=class-memaccess> + $<$:-Werror=unused-but-set-parameter> + $<$:-Werror=unused-but-set-variable> ) endif()