Browse Source

Silence GCC's extra warnings

GCC warned about ignored attributes that we use for clang and MSVC.
Removing the ignored attributes check keeps this quiet
7.0
Seth Hillbrand 3 years ago
parent
commit
5475d46bc5
  1. 5
      CMakeLists.txt
  2. 5
      include/lib_tree_model_adapter.h

5
CMakeLists.txt

@ -368,6 +368,11 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstandalone-debug" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstandalone-debug" )
endif()
# Suppress GCC warnings about unknown/unused attributes (e.g. cdecl, [[maybe_unused, etc)
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-attributes" )
endif()
if( KICAD_SANITIZE_ADDRESS )
add_definitions( -DKICAD_SANITIZE_ADDRESS )

5
include/lib_tree_model_adapter.h

@ -393,12 +393,7 @@ protected:
LIB_TREE_NODE_ROOT m_tree;
private:
#ifndef __clang__
// [[maybe_unused]] attribute is ignored by Gcc but generates a warning.
EDA_BASE_FRAME* m_parent;
#else
[[maybe_unused]] EDA_BASE_FRAME* m_parent;
#endif
SYM_FILTER_TYPE m_filter;
bool m_show_units;

Loading…
Cancel
Save