Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Avoid Coverity unchecked return value warnings
- Loading branch information
|
@@ -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() ) |
|
|
{ |
|
|
|
@@ -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 ) ); |
|
|
} |
|
|
|
|
|
|
@@ -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 |
|
|
|
@@ -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 ); |
|
|
|
@@ -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 ) |
|
|