Skip to content

Commit a9145f1

Browse files
committedNov 11, 2017
Avoid Coverity unchecked return value warnings
1 parent 48c7e31 commit a9145f1

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed
 

‎src/app/qgsattributetabledialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ void QgsAttributeTableDialog::runFieldCalculation( QgsVectorLayer *layer, const
510510
context.lastScope()->addVariable( QgsExpressionContextScope::StaticVariable( QStringLiteral( "row_number" ), rownum, true ) );
511511

512512
QVariant value = exp.evaluate( &context );
513-
fld.convertCompatible( value );
513+
( void )fld.convertCompatible( value );
514514
// Bail if we have a update error
515515
if ( exp.hasEvalError() )
516516
{

‎src/app/qgsfieldcalculator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ void QgsFieldCalculator::accept()
299299
}
300300
else
301301
{
302-
field.convertCompatible( value );
302+
( void )field.convertCompatible( value );
303303
mVectorLayer->changeAttributeValue( feature.id(), mAttributeId, value, newField ? emptyAttribute : feature.attributes().value( mAttributeId ) );
304304
}
305305

‎src/core/qgsvectorlayerfeatureiterator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@ void QgsVectorLayerFeatureIterator::addExpressionAttribute( QgsFeature &f, int a
875875
{
876876
mExpressionContext->setFeature( f );
877877
QVariant val = exp->evaluate( mExpressionContext.get() );
878-
mSource->mFields.at( attrIndex ).convertCompatible( val );
878+
( void )mSource->mFields.at( attrIndex ).convertCompatible( val );
879879
f.setAttribute( attrIndex, val );
880880
}
881881
else

‎src/gui/editorwidgets/qgsrangewidgetwrapper.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,9 @@ void QgsRangeWidgetWrapper::initWidget( QWidget *editor )
141141
}
142142
else
143143
{
144-
field().convertCompatible( min );
145-
field().convertCompatible( max );
146-
field().convertCompatible( step );
144+
( void )field().convertCompatible( min );
145+
( void )field().convertCompatible( max );
146+
( void )field().convertCompatible( step );
147147
if ( mQgsDial ) setupIntEditor( min, max, step, mQgsDial, this );
148148
else if ( mQgsSlider ) setupIntEditor( min, max, step, mQgsSlider, this );
149149
else if ( mDial ) setupIntEditor( min, max, step, mDial, this );

‎tests/src/core/testqgslayoutmodel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,7 @@ void TestQgsLayoutModel::proxyCrash()
789789
layout->addLayoutItem( item3 );
790790

791791
// reorder items - expect no crash!
792-
layout->itemsModel()->reorderItemUp( item1 );
792+
( void )layout->itemsModel()->reorderItemUp( item1 );
793793
}
794794

795795
QGSTEST_MAIN( TestQgsLayoutModel )

0 commit comments

Comments
 (0)
Please sign in to comment.