Tentative fix for -Wattributes

These warnings enabled conditionally for GCC 10.1+.
This commit is contained in:
Nekotekina 2021-03-01 00:22:32 +03:00
parent 461fa6a88a
commit b7c579adf9
4 changed files with 7 additions and 5 deletions

View File

@ -40,7 +40,9 @@ else()
endif()
#TODO Clean the code so these are removed
add_compile_options(-Wno-attributes)
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10.1 OR NOT CMAKE_COMPILER_IS_GNUCXX)
add_compile_options(-Wno-attributes)
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-fconstexpr-steps=16777216)

View File

@ -3,7 +3,7 @@
#include <QStringList>
#include "emu_settings_type.h"
#include "yaml-cpp/yaml.h"
#include "util/yaml.hpp"
// Helper methods to interact with YAML and the config settings.
namespace cfg_adapter
@ -15,7 +15,7 @@ namespace cfg_adapter
/** Returns possible options for values for some particular setting.*/
QStringList get_options(cfg_location location);
/** Returns dynamic property for some particular setting.*/
bool get_is_dynamic(emu_settings_type type);

View File

@ -1,8 +1,7 @@
#pragma once
#include "util/types.hpp"
#include "yaml-cpp/yaml.h"
#include "util/yaml.hpp"
#include "microphone_creator.h"
#include "render_creator.h"

View File

@ -12,6 +12,7 @@
#pragma GCC diagnostic ignored "-Wall"
#pragma GCC diagnostic ignored "-Wextra"
#pragma GCC diagnostic ignored "-Wold-style-cast"
#pragma GCC diagnostic ignored "-Wattributes"
#include "yaml-cpp/yaml.h"
#pragma GCC diagnostic pop
#endif