From 3cb168be5a943b00b12894f262aace11ba8449fd Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 6 Mar 2014 09:14:06 +0100 Subject: [PATCH] Removed warnings. --- pcbnew/class_zone.cpp | 4 ---- pcbnew/legacy_plugin.cpp | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/pcbnew/class_zone.cpp b/pcbnew/class_zone.cpp index 627d98ac87..6679fee49a 100644 --- a/pcbnew/class_zone.cpp +++ b/pcbnew/class_zone.cpp @@ -588,10 +588,6 @@ void ZONE_CONTAINER::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) { wxString msg; - BOARD* board = (BOARD*) m_Parent; - - wxASSERT( board ); - msg = _( "Zone Outline" ); // Display Cutout instead of Outline for holes inside a zone diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index 96c7a75a8f..f548c2b997 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -1814,7 +1814,7 @@ void LEGACY_PLUGIN::loadNETINFO_ITEM() { char buf[1024]; - NETINFO_ITEM* net; + NETINFO_ITEM* net = NULL; char* line; while( ( line = READLINE( m_reader ) ) != NULL ) @@ -1835,7 +1835,7 @@ void LEGACY_PLUGIN::loadNETINFO_ITEM() { // net 0 should be already in list, so store this net // if it is not the net 0, or if the net 0 does not exists. - if( net->GetNet() > 0 || m_board->FindNet( 0 ) == NULL ) + if( net != NULL && ( net->GetNet() > 0 || m_board->FindNet( 0 ) == NULL ) ) m_board->AppendNet( net ); else delete net;