Silence some GCC warnings

This commit is contained in:
aris-kimi 2024-04-16 11:11:50 +00:00 committed by Mark Roszko
parent 6b7852c2bb
commit 66bb49e2da
5 changed files with 17 additions and 19 deletions

View File

@ -416,7 +416,8 @@ wxDataViewColumn* LIB_TREE_MODEL_ADAPTER::doAddColumn( const wxString& aHeader,
wxDataViewColumn* col = new wxDataViewColumn( wxDataViewColumn* col = new wxDataViewColumn(
translatedHeader, new LIB_TREE_RENDERER(), index, m_colWidths[aHeader], wxALIGN_NOT, translatedHeader, new LIB_TREE_RENDERER(), index, m_colWidths[aHeader], wxALIGN_NOT,
wxDATAVIEW_CELL_INERT | wxDATAVIEW_COL_RESIZABLE | wxDATAVIEW_COL_SORTABLE ); wxDATAVIEW_CELL_INERT | static_cast<int>( wxDATAVIEW_COL_RESIZABLE )
| static_cast<int>( wxDATAVIEW_COL_SORTABLE ) );
m_widget->AppendColumn( col ); m_widget->AppendColumn( col );
col->SetMinWidth( headerMinWidth.x ); col->SetMinWidth( headerMinWidth.x );

View File

@ -444,7 +444,7 @@ TOOL_ACTION ACTIONS::findNext( TOOL_ACTION_ARGS()
TOOL_ACTION ACTIONS::findPrevious( TOOL_ACTION_ARGS() TOOL_ACTION ACTIONS::findPrevious( TOOL_ACTION_ARGS()
.Name( "common.Interactive.findPrevious" ) .Name( "common.Interactive.findPrevious" )
.Scope( AS_GLOBAL ) .Scope( AS_GLOBAL )
.DefaultHotkey( MD_SHIFT + WXK_F3 ) .DefaultHotkey( MD_SHIFT + static_cast<int>( WXK_F3 ) )
.LegacyHotkeyName( "Find Previous" ) .LegacyHotkeyName( "Find Previous" )
.FriendlyName( _( "Find Previous" ) ) .FriendlyName( _( "Find Previous" ) )
.Tooltip( _( "Find previous match" ) ) .Tooltip( _( "Find previous match" ) )
@ -453,7 +453,7 @@ TOOL_ACTION ACTIONS::findPrevious( TOOL_ACTION_ARGS()
TOOL_ACTION ACTIONS::findNextMarker( TOOL_ACTION_ARGS() TOOL_ACTION ACTIONS::findNextMarker( TOOL_ACTION_ARGS()
.Name( "common.Interactive.findNextMarker" ) .Name( "common.Interactive.findNextMarker" )
.Scope( AS_GLOBAL ) .Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + MD_SHIFT + WXK_F3 ) .DefaultHotkey( MD_CTRL + MD_SHIFT + static_cast<int>( WXK_F3 ) )
.LegacyHotkeyName( "Find Next Marker" ) .LegacyHotkeyName( "Find Next Marker" )
.FriendlyName( _( "Find Next Marker" ) ) .FriendlyName( _( "Find Next Marker" ) )
.Icon( BITMAPS::find ) ); .Icon( BITMAPS::find ) );
@ -528,7 +528,7 @@ TOOL_ACTION ACTIONS::zoomFitScreen( TOOL_ACTION_ARGS()
TOOL_ACTION ACTIONS::zoomFitObjects( TOOL_ACTION_ARGS() TOOL_ACTION ACTIONS::zoomFitObjects( TOOL_ACTION_ARGS()
.Name( "common.Control.zoomFitObjects" ) .Name( "common.Control.zoomFitObjects" )
.Scope( AS_GLOBAL ) .Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + WXK_HOME ) .DefaultHotkey( MD_CTRL + static_cast<int>( WXK_HOME ) )
.FriendlyName( _( "Zoom to Objects" ) ) .FriendlyName( _( "Zoom to Objects" ) )
.Icon( BITMAPS::zoom_fit_to_objects ) ); .Icon( BITMAPS::zoom_fit_to_objects ) );
@ -607,7 +607,7 @@ TOOL_ACTION ACTIONS::zoomCenter( TOOL_ACTION_ARGS()
TOOL_ACTION ACTIONS::zoomTool( TOOL_ACTION_ARGS() TOOL_ACTION ACTIONS::zoomTool( TOOL_ACTION_ARGS()
.Name( "common.Control.zoomTool" ) .Name( "common.Control.zoomTool" )
.Scope( AS_GLOBAL ) .Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + WXK_F5 ) .DefaultHotkey( MD_CTRL + static_cast<int>( WXK_F5 ) )
.LegacyHotkeyName( "Zoom to Selection" ) .LegacyHotkeyName( "Zoom to Selection" )
.FriendlyName( _( "Zoom to Selection" ) ) .FriendlyName( _( "Zoom to Selection" ) )
.Icon( BITMAPS::zoom_area ) .Icon( BITMAPS::zoom_area )
@ -673,7 +673,7 @@ TOOL_ACTION ACTIONS::cursorRight( TOOL_ACTION_ARGS()
TOOL_ACTION ACTIONS::cursorUpFast( TOOL_ACTION_ARGS() TOOL_ACTION ACTIONS::cursorUpFast( TOOL_ACTION_ARGS()
.Name( "common.Control.cursorUpFast" ) .Name( "common.Control.cursorUpFast" )
.Scope( AS_GLOBAL ) .Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + WXK_UP ) .DefaultHotkey( MD_CTRL + static_cast<int>( WXK_UP ) )
.FriendlyName( _( "Cursor Up Fast" ) ) .FriendlyName( _( "Cursor Up Fast" ) )
.Flags( AF_NONE ) .Flags( AF_NONE )
.Parameter( CURSOR_UP_FAST ) ); .Parameter( CURSOR_UP_FAST ) );
@ -681,7 +681,7 @@ TOOL_ACTION ACTIONS::cursorUpFast( TOOL_ACTION_ARGS()
TOOL_ACTION ACTIONS::cursorDownFast( TOOL_ACTION_ARGS() TOOL_ACTION ACTIONS::cursorDownFast( TOOL_ACTION_ARGS()
.Name( "common.Control.cursorDownFast" ) .Name( "common.Control.cursorDownFast" )
.Scope( AS_GLOBAL ) .Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + WXK_DOWN ) .DefaultHotkey( MD_CTRL + static_cast<int>( WXK_DOWN ) )
.FriendlyName( _( "Cursor Down Fast" ) ) .FriendlyName( _( "Cursor Down Fast" ) )
.Flags( AF_NONE ) .Flags( AF_NONE )
.Parameter( CURSOR_DOWN_FAST ) ); .Parameter( CURSOR_DOWN_FAST ) );
@ -689,7 +689,7 @@ TOOL_ACTION ACTIONS::cursorDownFast( TOOL_ACTION_ARGS()
TOOL_ACTION ACTIONS::cursorLeftFast( TOOL_ACTION_ARGS() TOOL_ACTION ACTIONS::cursorLeftFast( TOOL_ACTION_ARGS()
.Name( "common.Control.cursorLeftFast" ) .Name( "common.Control.cursorLeftFast" )
.Scope( AS_GLOBAL ) .Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + WXK_LEFT ) .DefaultHotkey( MD_CTRL + static_cast<int>( WXK_LEFT ) )
.FriendlyName( _( "Cursor Left Fast" ) ) .FriendlyName( _( "Cursor Left Fast" ) )
.Flags( AF_NONE ) .Flags( AF_NONE )
.Parameter( CURSOR_LEFT_FAST ) ); .Parameter( CURSOR_LEFT_FAST ) );
@ -697,7 +697,7 @@ TOOL_ACTION ACTIONS::cursorLeftFast( TOOL_ACTION_ARGS()
TOOL_ACTION ACTIONS::cursorRightFast( TOOL_ACTION_ARGS() TOOL_ACTION ACTIONS::cursorRightFast( TOOL_ACTION_ARGS()
.Name( "common.Control.cursorRightFast" ) .Name( "common.Control.cursorRightFast" )
.Scope( AS_GLOBAL ) .Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + WXK_RIGHT ) .DefaultHotkey( MD_CTRL + static_cast<int>( WXK_RIGHT ) )
.FriendlyName( _( "Cursor Right Fast" ) ) .FriendlyName( _( "Cursor Right Fast" ) )
.Flags( AF_NONE ) .Flags( AF_NONE )
.Parameter( CURSOR_RIGHT_FAST ) ); .Parameter( CURSOR_RIGHT_FAST ) );
@ -741,7 +741,7 @@ TOOL_ACTION ACTIONS::unpinLibrary( TOOL_ACTION_ARGS()
TOOL_ACTION ACTIONS::panUp( TOOL_ACTION_ARGS() TOOL_ACTION ACTIONS::panUp( TOOL_ACTION_ARGS()
.Name( "common.Control.panUp" ) .Name( "common.Control.panUp" )
.Scope( AS_GLOBAL ) .Scope( AS_GLOBAL )
.DefaultHotkey( MD_SHIFT + WXK_UP ) .DefaultHotkey( MD_SHIFT + static_cast<int>( WXK_UP ) )
.FriendlyName( _( "Pan Up" ) ) .FriendlyName( _( "Pan Up" ) )
.Flags( AF_NONE ) .Flags( AF_NONE )
.Parameter( CURSOR_UP ) ); .Parameter( CURSOR_UP ) );
@ -749,7 +749,7 @@ TOOL_ACTION ACTIONS::panUp( TOOL_ACTION_ARGS()
TOOL_ACTION ACTIONS::panDown( TOOL_ACTION_ARGS() TOOL_ACTION ACTIONS::panDown( TOOL_ACTION_ARGS()
.Name( "common.Control.panDown" ) .Name( "common.Control.panDown" )
.Scope( AS_GLOBAL ) .Scope( AS_GLOBAL )
.DefaultHotkey( MD_SHIFT + WXK_DOWN ) .DefaultHotkey( MD_SHIFT + static_cast<int>( WXK_DOWN ) )
.FriendlyName( _( "Pan Down" ) ) .FriendlyName( _( "Pan Down" ) )
.Flags( AF_NONE ) .Flags( AF_NONE )
.Parameter( CURSOR_DOWN ) ); .Parameter( CURSOR_DOWN ) );
@ -757,7 +757,7 @@ TOOL_ACTION ACTIONS::panDown( TOOL_ACTION_ARGS()
TOOL_ACTION ACTIONS::panLeft( TOOL_ACTION_ARGS() TOOL_ACTION ACTIONS::panLeft( TOOL_ACTION_ARGS()
.Name( "common.Control.panLeft" ) .Name( "common.Control.panLeft" )
.Scope( AS_GLOBAL ) .Scope( AS_GLOBAL )
.DefaultHotkey( MD_SHIFT + WXK_LEFT ) .DefaultHotkey( MD_SHIFT + static_cast<int>( WXK_LEFT ) )
.FriendlyName( _( "Pan Left" ) ) .FriendlyName( _( "Pan Left" ) )
.Flags( AF_NONE ) .Flags( AF_NONE )
.Parameter( CURSOR_LEFT ) ); .Parameter( CURSOR_LEFT ) );
@ -765,7 +765,7 @@ TOOL_ACTION ACTIONS::panLeft( TOOL_ACTION_ARGS()
TOOL_ACTION ACTIONS::panRight( TOOL_ACTION_ARGS() TOOL_ACTION ACTIONS::panRight( TOOL_ACTION_ARGS()
.Name( "common.Control.panRight" ) .Name( "common.Control.panRight" )
.Scope( AS_GLOBAL ) .Scope( AS_GLOBAL )
.DefaultHotkey( MD_SHIFT + WXK_RIGHT ) .DefaultHotkey( MD_SHIFT + static_cast<int>( WXK_RIGHT ) )
.FriendlyName( _( "Pan Right" ) ) .FriendlyName( _( "Pan Right" ) )
.Flags( AF_NONE ) .Flags( AF_NONE )
.Parameter( CURSOR_RIGHT ) ); .Parameter( CURSOR_RIGHT ) );
@ -1113,7 +1113,7 @@ TOOL_ACTION ACTIONS::about( TOOL_ACTION_ARGS()
TOOL_ACTION ACTIONS::listHotKeys( TOOL_ACTION_ARGS() TOOL_ACTION ACTIONS::listHotKeys( TOOL_ACTION_ARGS()
.Name( "common.SuiteControl.listHotKeys" ) .Name( "common.SuiteControl.listHotKeys" )
.Scope( AS_GLOBAL ) .Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + WXK_F1 ) .DefaultHotkey( MD_CTRL + static_cast<int>( WXK_F1 ) )
.LegacyHotkeyName( "List Hotkeys" ) .LegacyHotkeyName( "List Hotkeys" )
.FriendlyName( _( "List Hotkeys..." ) ) .FriendlyName( _( "List Hotkeys..." ) )
.Tooltip( _( "Displays current hotkeys table and corresponding commands" ) ) .Tooltip( _( "Displays current hotkeys table and corresponding commands" ) )

View File

@ -175,7 +175,7 @@ void SPLIT_BUTTON::OnLeftButtonUp( wxMouseEvent& aEvent )
wxASSERT( pEventHandler ); wxASSERT( pEventHandler );
pEventHandler->CallAfter( pEventHandler->CallAfter(
[=]() [this]()
{ {
wxCommandEvent evt( wxEVT_BUTTON, GetId() ); wxCommandEvent evt( wxEVT_BUTTON, GetId() );
evt.SetEventObject( this ); evt.SetEventObject( this );

View File

@ -157,7 +157,7 @@ void STD_BITMAP_BUTTON::OnLeftButtonUp( wxMouseEvent& aEvent )
wxASSERT( pEventHandler ); wxASSERT( pEventHandler );
pEventHandler->CallAfter( pEventHandler->CallAfter(
[=]() [this]()
{ {
wxCommandEvent evt( wxEVT_BUTTON, GetId() ); wxCommandEvent evt( wxEVT_BUTTON, GetId() );
evt.SetEventObject( this ); evt.SetEventObject( this );

View File

@ -712,10 +712,7 @@ bool PROJECT_TREE_PANE::hasChangedFiles()
if( !repo ) if( !repo )
return false; return false;
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wmissing-field-initializers"
git_status_options opts = GIT_STATUS_OPTIONS_INIT; git_status_options opts = GIT_STATUS_OPTIONS_INIT;
#pragma clang diagnostic pop
opts.show = GIT_STATUS_SHOW_INDEX_AND_WORKDIR; opts.show = GIT_STATUS_SHOW_INDEX_AND_WORKDIR;
opts.flags = GIT_STATUS_OPT_INCLUDE_UNTRACKED | GIT_STATUS_OPT_RENAMES_HEAD_TO_INDEX opts.flags = GIT_STATUS_OPT_INCLUDE_UNTRACKED | GIT_STATUS_OPT_RENAMES_HEAD_TO_INDEX