Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Avoid Coverity unchecked return value warnings
  • Loading branch information
nyalldawson committed Nov 11, 2017
1 parent 48c7e31 commit a9145f1
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/app/qgsattributetabledialog.cpp
Expand Up @@ -510,7 +510,7 @@ void QgsAttributeTableDialog::runFieldCalculation( QgsVectorLayer *layer, const
context.lastScope()->addVariable( QgsExpressionContextScope::StaticVariable( QStringLiteral( "row_number" ), rownum, true ) );

QVariant value = exp.evaluate( &context );
fld.convertCompatible( value );
( void )fld.convertCompatible( value );
// Bail if we have a update error
if ( exp.hasEvalError() )
{
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsfieldcalculator.cpp
Expand Up @@ -299,7 +299,7 @@ void QgsFieldCalculator::accept()
}
else
{
field.convertCompatible( value );
( void )field.convertCompatible( value );
mVectorLayer->changeAttributeValue( feature.id(), mAttributeId, value, newField ? emptyAttribute : feature.attributes().value( mAttributeId ) );
}

Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsvectorlayerfeatureiterator.cpp
Expand Up @@ -875,7 +875,7 @@ void QgsVectorLayerFeatureIterator::addExpressionAttribute( QgsFeature &f, int a
{
mExpressionContext->setFeature( f );
QVariant val = exp->evaluate( mExpressionContext.get() );
mSource->mFields.at( attrIndex ).convertCompatible( val );
( void )mSource->mFields.at( attrIndex ).convertCompatible( val );
f.setAttribute( attrIndex, val );
}
else
Expand Down
6 changes: 3 additions & 3 deletions src/gui/editorwidgets/qgsrangewidgetwrapper.cpp
Expand Up @@ -141,9 +141,9 @@ void QgsRangeWidgetWrapper::initWidget( QWidget *editor )
}
else
{
field().convertCompatible( min );
field().convertCompatible( max );
field().convertCompatible( step );
( void )field().convertCompatible( min );
( void )field().convertCompatible( max );
( void )field().convertCompatible( step );
if ( mQgsDial ) setupIntEditor( min, max, step, mQgsDial, this );
else if ( mQgsSlider ) setupIntEditor( min, max, step, mQgsSlider, this );
else if ( mDial ) setupIntEditor( min, max, step, mDial, this );
Expand Down
2 changes: 1 addition & 1 deletion tests/src/core/testqgslayoutmodel.cpp
Expand Up @@ -789,7 +789,7 @@ void TestQgsLayoutModel::proxyCrash()
layout->addLayoutItem( item3 );

// reorder items - expect no crash!
layout->itemsModel()->reorderItemUp( item1 );
( void )layout->itemsModel()->reorderItemUp( item1 );
}

QGSTEST_MAIN( TestQgsLayoutModel )
Expand Down

0 comments on commit a9145f1

Please sign in to comment.