From 7679dcf4696b3579fee7d390feb53416ae0b9ec4 Mon Sep 17 00:00:00 2001 From: arcum42 Date: Fri, 23 Aug 2019 14:40:33 -0700 Subject: [PATCH] clang: Get rid of a number of warnings. I don't need pages of warnings that things clearly marked in the code as deprecated are deprecated, and I doubt I'll be worrying about those overloaded functions any time soon. --- cmake/BuildParameters.cmake | 3 ++- common/include/x86emitter/legacy_instructions.h | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cmake/BuildParameters.cmake b/cmake/BuildParameters.cmake index d6bbaeccc8..786956e1e0 100644 --- a/cmake/BuildParameters.cmake +++ b/cmake/BuildParameters.cmake @@ -315,7 +315,8 @@ set(HARDENING_FLAG "-D_FORTIFY_SOURCE=2 -Wformat -Wformat-security") # Note: future GCC (aka GCC 5.1.1) has less false positive so warning could maybe put back # -Wno-unused-function: warn for function not used in release build # -Wno-unused-value: lots of warning for this kind of statements "0 && ...". There are used to disable some parts of code in release/dev build. -set(DEFAULT_WARNINGS "-Wall -Wextra -Wno-attributes -Wno-unused-function -Wno-unused-parameter -Wno-missing-field-initializers ") +# -Wno-overloaded-virtual: Gives a fair number of warnings under clang over in the wxwidget gui section of the code. +set(DEFAULT_WARNINGS "-Wall -Wextra -Wno-attributes -Wno-unused-function -Wno-unused-parameter -Wno-missing-field-initializers -Wno-overloaded-virtual") if (NOT USE_ICC) set(DEFAULT_WARNINGS "${DEFAULT_WARNINGS} -Wno-unused-value ") endif() diff --git a/common/include/x86emitter/legacy_instructions.h b/common/include/x86emitter/legacy_instructions.h index 602e5137b8..e17e2ff704 100644 --- a/common/include/x86emitter/legacy_instructions.h +++ b/common/include/x86emitter/legacy_instructions.h @@ -15,8 +15,8 @@ #pragma once -#if defined(__linux__) && defined(__clang__) -#define ATTR_DEP [[deprecated]] +//#define SPAM_DEPRECATION_WARNINGS +#if defined(__linux__) && defined(__clang__) && defined(SPAM_DEPRECATION_WARNINGS) #define ATTR_DEP [[deprecated]] #else #define ATTR_DEP