Fix a few Coverity warnings (not initialized vars) and a minor compil warning

This commit is contained in:
jean-pierre charras 2021-06-09 11:22:43 +02:00
parent 2c19fbd752
commit 5cce3f6e18
4 changed files with 6 additions and 5 deletions

View File

@ -105,7 +105,7 @@ void DS_DATA_ITEM::SyncDrawItems( DS_DRAW_ITEM_LIST* aCollector, KIGFX::VIEW* aV
m_drawItems.clear();
for( size_t j = 0; j < m_RepeatCount; j++ )
for( int j = 0; j < m_RepeatCount; j++ )
{
if( j && ! IsInsidePage( j ) )
continue;
@ -578,7 +578,7 @@ void DS_DATA_ITEM_TEXT::SyncDrawItems( DS_DRAW_ITEM_LIST* aCollector, KIGFX::VIE
m_drawItems.clear();
for( size_t j = 0; j < m_RepeatCount; ++j )
for( int j = 0; j < m_RepeatCount; ++j )
{
if( j > 0 && !IsInsidePage( j ) )
continue;
@ -740,7 +740,7 @@ void DS_DATA_ITEM_BITMAP::SyncDrawItems( DS_DRAW_ITEM_LIST* aCollector, KIGFX::V
m_drawItems.clear();
for( size_t j = 0; j < m_RepeatCount; j++ )
for( int j = 0; j < m_RepeatCount; j++ )
{
if( j && !IsInsidePage( j ) )
continue;

View File

@ -45,6 +45,7 @@ using namespace std::placeholders;
ACTION_MENU::ACTION_MENU( bool isContextMenu, TOOL_INTERACTIVE* aTool ) :
m_isForcedPosition( false ),
m_dirty( true ),
m_titleDisplayed( false ),
m_isContextMenu( isContextMenu ),

View File

@ -318,7 +318,7 @@ protected:
bool BoolArg; ///< A bool argument
int IntArg; ///< An int argument
} m_Argument;
cairo_path_t* m_CairoPath; ///< Pointer to a Cairo path
cairo_path_t* m_CairoPath = nullptr; ///< Pointer to a Cairo path
} GROUP_ELEMENT;
typedef std::deque<GROUP_ELEMENT> GROUP; ///< A graphic group type definition

View File

@ -231,5 +231,5 @@ private:
std::array<r_data, S4R+1> m_results; // 2R, 3R and 4R results
uint32_t m_series = E6; // Radio Button State
uint32_t m_enable_4R = false; // Check Box 4R enable
double m_required_value; // required Resistor
double m_required_value =0.0; // required Resistor
};