Fix a few (minor) compil warnings.

This commit is contained in:
jean-pierre charras 2023-08-26 09:40:09 +02:00
parent 331176744c
commit b3aa8a0c49
4 changed files with 8 additions and 8 deletions

View File

@ -1,7 +1,7 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -250,8 +250,8 @@ void PANEL_SETUP_PINMAP::changeErrorLevel( wxCommandEvent& event )
{
int id = event.GetId();
int ii = id - ID_MATRIX_0;
int x = ii / ELECTRICAL_PINTYPES_TOTAL;
int y = ii % ELECTRICAL_PINTYPES_TOTAL;
ELECTRICAL_PINTYPE x = static_cast<ELECTRICAL_PINTYPE>( ii / ELECTRICAL_PINTYPES_TOTAL );
ELECTRICAL_PINTYPE y = static_cast<ELECTRICAL_PINTYPE>( ii % ELECTRICAL_PINTYPES_TOTAL );
wxWindow* butt = static_cast<wxWindow*>( event.GetEventObject() );
int level = static_cast<int>( m_schematic->ErcSettings().GetPinMapValue( y, x ) );

View File

@ -48,7 +48,7 @@ public:
wxString GetResultCell( int aRow, int aCol ) override
{
if( aRow >= m_hitlist.size() )
if( aRow >= static_cast<int>( m_hitlist.size() ) )
return wxEmptyString;
const SCH_SEARCH_HIT& hit = m_hitlist[aRow];

View File

@ -1063,7 +1063,7 @@ bool FOOTPRINT_VIEWER_FRAME::ShowModal( wxString* aFootprint, wxWindow* aParent
if( fpid.IsValid() )
{
wxString libraryName = fpid.GetLibNickname();
wxHyperlinkCtrl* button;
wxHyperlinkCtrl* button = nullptr;
if( !fpTable->HasLibrary( fpid.GetLibNickname(), false )
|| !fpTable->HasLibrary( fpid.GetLibNickname(), true ) )

View File

@ -39,7 +39,7 @@ public:
wxString GetResultCell( int aRow, int aCol ) override
{
if( aRow >= m_hitlist.size() )
if( aRow >= static_cast<int>(m_hitlist.size() ) )
return wxEmptyString;
BOARD_ITEM* item = m_hitlist[aRow];