mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
Fix compil warnings and minor Coverity warnings (uninitialized variables).
This commit is contained in:
parent
37a656fae7
commit
56b50e1600
@ -485,8 +485,8 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
|
||||
// Solder mask and Solder paste have the same Z position
|
||||
for( PCB_LAYER_ID layer_id : { B_Adhes, B_Mask, B_Paste, F_Adhes, F_Mask, F_Paste, B_SilkS, F_SilkS } )
|
||||
{
|
||||
float zposTop;
|
||||
float zposBottom;
|
||||
float zposTop = 0.0;
|
||||
float zposBottom = 0.0;
|
||||
|
||||
switch( layer_id )
|
||||
{
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
struct KICOMMON_API JOBSET_JOB
|
||||
{
|
||||
JOBSET_JOB() {}
|
||||
JOBSET_JOB() : m_job( nullptr ) {}
|
||||
|
||||
JOBSET_JOB( wxString id, wxString type, JOB* job ) : m_id( id ), m_type( type ), m_job( job ) {}
|
||||
|
||||
@ -48,7 +48,9 @@ enum class JOBSET_OUTPUT_TYPE
|
||||
|
||||
struct KICOMMON_API JOBSET_OUTPUT
|
||||
{
|
||||
JOBSET_OUTPUT() {}
|
||||
JOBSET_OUTPUT() :
|
||||
m_type( JOBSET_OUTPUT_TYPE::FOLDER ), m_outputHandler( nullptr )
|
||||
{}
|
||||
|
||||
JOBSET_OUTPUT( wxString id, JOBSET_OUTPUT_TYPE type, JOBS_OUTPUT_HANDLER* outputHandler ) :
|
||||
m_id( id ), m_type( type ), m_outputHandler( outputHandler )
|
||||
|
@ -45,10 +45,10 @@
|
||||
|
||||
struct JOB_TYPE_INFO
|
||||
{
|
||||
wxString name;
|
||||
enum BITMAPS bitmap;
|
||||
bool outputPathIsFolder;
|
||||
wxString fileWildcard;
|
||||
wxString name;
|
||||
BITMAPS bitmap;
|
||||
bool outputPathIsFolder;
|
||||
wxString fileWildcard;
|
||||
};
|
||||
|
||||
|
||||
@ -434,7 +434,7 @@ void PANEL_JOBS::OnAddJobClick( wxCommandEvent& aEvent )
|
||||
|
||||
const JOB_REGISTRY::REGISTRY_MAP_T& jobMap = JOB_REGISTRY::GetRegistry();
|
||||
|
||||
for( const std::pair<wxString, JOB_REGISTRY_ENTRY>& entry : jobMap )
|
||||
for( const std::pair<const wxString, JOB_REGISTRY_ENTRY>& entry : jobMap )
|
||||
{
|
||||
wxArrayString item;
|
||||
item.Add( wxGetTranslation( entry.second.title ) );
|
||||
@ -451,7 +451,7 @@ void PANEL_JOBS::OnAddJobClick( wxCommandEvent& aEvent )
|
||||
wxString jobKey;
|
||||
if( !selectedString.IsEmpty() )
|
||||
{
|
||||
for( const std::pair<wxString, JOB_REGISTRY_ENTRY>& entry : jobMap )
|
||||
for( const std::pair<const wxString, JOB_REGISTRY_ENTRY>& entry : jobMap )
|
||||
{
|
||||
if( wxGetTranslation( entry.second.title ) == selectedString )
|
||||
{
|
||||
@ -479,7 +479,7 @@ void PANEL_JOBS::OnAddOutputClick( wxCommandEvent& aEvent )
|
||||
|
||||
headers.Add( _( "Job Types" ) );
|
||||
|
||||
for( const std::pair<JOBSET_OUTPUT_TYPE, JOB_TYPE_INFO>& jobType : jobTypeInfos )
|
||||
for( const std::pair<const JOBSET_OUTPUT_TYPE, JOB_TYPE_INFO>& jobType : jobTypeInfos )
|
||||
{
|
||||
wxArrayString item;
|
||||
item.Add( wxGetTranslation( jobType.second.name ) );
|
||||
@ -494,7 +494,7 @@ void PANEL_JOBS::OnAddOutputClick( wxCommandEvent& aEvent )
|
||||
{
|
||||
wxString selectedString = dlg.GetTextSelection();
|
||||
|
||||
for( const std::pair<JOBSET_OUTPUT_TYPE, JOB_TYPE_INFO>& jobType : jobTypeInfos )
|
||||
for( const std::pair<const JOBSET_OUTPUT_TYPE, JOB_TYPE_INFO>& jobType : jobTypeInfos )
|
||||
{
|
||||
if( wxGetTranslation( jobType.second.name ) == selectedString )
|
||||
{
|
||||
|
@ -221,7 +221,11 @@ public:
|
||||
{
|
||||
public:
|
||||
PACKAGE( const size_t aIndex, const wxString& afpName ) :
|
||||
m_index( aIndex ), m_name( afpName )
|
||||
m_index( aIndex ), m_name( afpName ),
|
||||
m_pitch( 0 ),
|
||||
m_xmin( 0 ), m_ymin( 0 ),
|
||||
m_xmax( 0 ), m_ymax( 0 )
|
||||
|
||||
{
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user