diff --git a/common/font/stroke_font.cpp b/common/font/stroke_font.cpp index 7084325ebb..15390b7783 100644 --- a/common/font/stroke_font.cpp +++ b/common/font/stroke_font.cpp @@ -61,7 +61,8 @@ std::vector* g_defaultFontGlyphBoundingBoxes; STROKE_FONT::STROKE_FONT() : m_glyphs( nullptr ), - m_glyphBoundingBoxes( nullptr ) + m_glyphBoundingBoxes( nullptr ), + m_maxGlyphWidth( 0.0 ) { } diff --git a/gerbview/widgets/gerbview_layer_widget.cpp b/gerbview/widgets/gerbview_layer_widget.cpp index 7031179cce..38189d4bb4 100644 --- a/gerbview/widgets/gerbview_layer_widget.cpp +++ b/gerbview/widgets/gerbview_layer_widget.cpp @@ -225,7 +225,7 @@ void GERBER_LAYER_WIDGET::onPopupSelection( wxCommandEvent& event ) case ID_LAYER_MOVE_DOWN: layer = m_frame->GetActiveLayer(); - if( layer < ( GetImagesList()->GetLoadedImageCount() - 1 ) ) + if( layer < ( (int)GetImagesList()->GetLoadedImageCount() - 1 ) ) { m_frame->RemapLayers( GetImagesList()->SwapImages( layer, layer + 1 ) ); m_frame->SetActiveLayer( layer + 1 ); diff --git a/pcbnew/teardrop/teardrop.cpp b/pcbnew/teardrop/teardrop.cpp index 83d8ec3ff8..4acdc3f563 100644 --- a/pcbnew/teardrop/teardrop.cpp +++ b/pcbnew/teardrop/teardrop.cpp @@ -193,7 +193,7 @@ int TEARDROP_MANAGER::SetTeardrops( BOARD_COMMIT* aCommitter, if( count || removed_cnt || track2trackCount ) { ZONE_FILLER filler( m_board, aCommitter ); - filler.Fill( m_board->Zones() ); + (void)filler.Fill( m_board->Zones() ); if( aCommitter ) aCommitter->Push( _( "Add teardrops" ) ); @@ -389,7 +389,7 @@ int TEARDROP_MANAGER::RemoveTeardrops( BOARD_COMMIT* aCommitter, bool aCommitAft if( count ) { ZONE_FILLER filler( m_board, aCommitter ); - filler.Fill( m_board->Zones() ); + (void)filler.Fill( m_board->Zones() ); if( aCommitter && aCommitAfterRemove ) aCommitter->Push( _( "Remove teardrops" ) ); diff --git a/pcbnew/teardrop/teardrop_utils.cpp b/pcbnew/teardrop/teardrop_utils.cpp index 33155a8030..288601bc31 100644 --- a/pcbnew/teardrop/teardrop_utils.cpp +++ b/pcbnew/teardrop/teardrop_utils.cpp @@ -402,7 +402,8 @@ bool TEARDROP_MANAGER::ComputePointsOnPadVia( TEARDROP_PARAMETERS* aCurrParams, { // Compute the 2 anchor points on pad/via of the teardrop shape - PAD* pad = dynamic_cast( aViaPad.m_Parent ); + PAD* pad = ( aViaPad.m_Parent->Type() == PCB_PAD_T ) ? static_cast(aViaPad.m_Parent) + : nullptr; SHAPE_POLY_SET c_buffer; // aHeightRatio is the factor to calculate the aViaPad teardrop prefered height @@ -428,7 +429,7 @@ bool TEARDROP_MANAGER::ComputePointsOnPadVia( TEARDROP_PARAMETERS* aCurrParams, TransformCircleToPolygon( c_buffer, aViaPad.m_Pos, aViaPad.m_Width/2 , ARC_LOW_DEF, ERROR_INSIDE, 16 ); } - else + else // Only PADS can have a not round shape { wxASSERT( pad ); force_clip_shape = true;