Fix a few coverity errors

This commit is contained in:
jean-pierre charras 2019-02-16 14:09:21 +01:00
parent f364e81a91
commit ec59361f75
6 changed files with 12 additions and 5 deletions

View File

@ -52,7 +52,8 @@ KIDIALOG::KIDIALOG( wxWindow* aParent, const wxString& aMessage,
KIDIALOG::KIDIALOG( wxWindow* aParent, const wxString& aMessage,
KD_TYPE aType, const wxString& aCaption )
: wxRichMessageDialog( aParent, aMessage, getCaption( aType, aCaption ), getStyle( aType ) )
: wxRichMessageDialog( aParent, aMessage, getCaption( aType, aCaption ), getStyle( aType ) ),
m_hash( 0 )
{
}

View File

@ -45,6 +45,7 @@ BLOCK_SELECTOR::BLOCK_SELECTOR() :
m_state = STATE_NO_BLOCK; // State (enum BLOCK_STATE_T) of block.
m_command = BLOCK_IDLE; // Type (enum BLOCK_COMMAND_T) of operation.
m_color = BROWN;
m_appendUndo = false;
}

View File

@ -48,8 +48,9 @@ static const char illegalFileNameChars[] = "\\/:\"<>|";
*/
wxString EscapeString( const wxString& aSource )
{
#if 1
return aSource;
#else
wxString converted;
for( wxUniChar c: aSource )
@ -87,13 +88,15 @@ wxString EscapeString( const wxString& aSource )
}
return converted;
#endif
}
wxString UnescapeString( const wxString& aSource )
{
#if 1
return aSource;
#else
wxString converted = aSource;
converted.Replace( "&quot;", "\"" );
@ -114,6 +117,7 @@ wxString UnescapeString( const wxString& aSource )
converted.Replace( "&amp;", "&" );
return converted;
#endif
}

View File

@ -87,6 +87,7 @@ AR_AUTOPLACER::AR_AUTOPLACER( BOARD* aBoard )
m_gridSize = Millimeter2iu( STEP_AR_MM );
m_progressReporter = nullptr;
m_refreshCallback = nullptr;
m_minCost = 0.0;
}

View File

@ -197,6 +197,7 @@ public:
long style = 0, const wxString choices[] = NULL, int unused = 0)
: wxHtmlListBox( parent, id, pos, size, style )
{
m_units = MILLIMETRES;
m_list = 0;
}

View File

@ -78,8 +78,7 @@ void GRID_CELL_LAYER_RENDERER::Draw( wxGrid& aGrid, wxGridCellAttr& aAttr, wxDC&
GRID_CELL_LAYER_SELECTOR::GRID_CELL_LAYER_SELECTOR( PCB_BASE_FRAME* aFrame, LSET aMask ) :
m_frame( aFrame ),
m_mask( aMask )
m_frame( aFrame ), m_mask( aMask ), m_value( 0 )
{
}