7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-04 23:35:31 +00:00

Fix some GCC build warnings

This commit is contained in:
Jon Evans 2025-02-11 20:26:51 -05:00
parent ca63d1ae38
commit 0ca9791577
4 changed files with 6 additions and 6 deletions

View File

@ -195,6 +195,7 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
# 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" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-ignored-attributes" )
endif()
# Avoid ABI warnings, specifically one about an ABI change on ppc64el from gcc5 to gcc 6.

View File

@ -284,7 +284,7 @@ void API_PLUGIN_MANAGER::InvokeAction( const wxString& aIdentifier )
if( pythonHome )
env.env[wxS( "VIRTUAL_ENV" )] = *pythonHome;
long pid = manager.Execute( { pluginFile.GetFullPath() },
[[maybe_unused]] long pid = manager.Execute( { pluginFile.GetFullPath() },
[]( int aRetVal, const wxString& aOutput, const wxString& aError )
{
wxLogTrace( traceApi,

View File

@ -1948,10 +1948,9 @@ const EMBEDDED_FILES* LIB_SYMBOL::GetEmbeddedFiles() const
std::set<KIFONT::OUTLINE_FONT*> LIB_SYMBOL::GetFonts() const
{
using OUTLINE_FONT = KIFONT::OUTLINE_FONT;
using EMBEDDING_PERMISSION = OUTLINE_FONT::EMBEDDING_PERMISSION;
using EMBEDDING_PERMISSION = KIFONT::OUTLINE_FONT::EMBEDDING_PERMISSION;
std::set<OUTLINE_FONT*> fonts;
std::set<KIFONT::OUTLINE_FONT*> fonts;
for( const SCH_ITEM& item : m_drawings )
{
@ -1961,7 +1960,7 @@ std::set<KIFONT::OUTLINE_FONT*> LIB_SYMBOL::GetFonts() const
if( auto* font = text.GetFont(); font && !font->IsStroke() )
{
auto* outline = static_cast<OUTLINE_FONT*>( font );
auto* outline = static_cast<KIFONT::OUTLINE_FONT*>( font );
auto permission = outline->GetEmbeddingPermission();
if( permission == EMBEDDING_PERMISSION::EDITABLE

View File

@ -663,7 +663,7 @@ void KICAD_MANAGER_FRAME::doCloseWindow()
{
wxWindow* page = m_notebook->GetPage( i );
if( PANEL_NOTEBOOK_BASE* panel = dynamic_cast<PANEL_NOTEBOOK_BASE*>( page ) )
if( dynamic_cast<PANEL_NOTEBOOK_BASE*>( page ) )
m_notebook->DeletePage( i );
}