Skip to content

Commit 2d8feeb

Browse files
committed
Some very minor Coverity related fixes
1 parent da092bf commit 2d8feeb

File tree

2 files changed

+12
-14
lines changed

2 files changed

+12
-14
lines changed

src/providers/ogr/qgsogrprovider.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,6 @@ QStringList QgsOgrProvider::subLayers() const
650650
OGRFeatureH fet;
651651
while (( fet = OGR_L_GetNextFeature( layer ) ) )
652652
{
653-
if ( !fet ) continue;
654653
OGRGeometryH geom = OGR_F_GetGeometryRef( fet );
655654
if ( geom )
656655
{
@@ -2502,7 +2501,6 @@ void QgsOgrProvider::recalculateFeatureCount()
25022501
OGRFeatureH fet;
25032502
while (( fet = OGR_L_GetNextFeature( ogrLayer ) ) )
25042503
{
2505-
if ( !fet ) continue;
25062504
OGRGeometryH geom = OGR_F_GetGeometryRef( fet );
25072505
if ( geom )
25082506
{

tests/qt_modeltest/modeltest.cpp

+12-12
Original file line numberDiff line numberDiff line change
@@ -133,23 +133,23 @@ void ModelTest::nonDestructiveBasicTest()
133133
Qt::ItemFlags flags = model->flags( QModelIndex() );
134134
Q_ASSERT( flags == Qt::ItemIsDropEnabled || flags == 0 );
135135
( void )model->hasChildren( QModelIndex() );
136-
model->hasIndex( 0, 0 );
137-
model->headerData( 0, Qt::Horizontal );
138-
model->index( 0, 0 );
139-
model->itemData( QModelIndex() );
136+
( void )model->hasIndex( 0, 0 );
137+
( void )model->headerData( 0, Qt::Horizontal );
138+
( void )model->index( 0, 0 );
139+
( void )model->itemData( QModelIndex() );
140140
QVariant cache;
141-
model->match( QModelIndex(), -1, cache );
142-
model->mimeTypes();
141+
( void )model->match( QModelIndex(), -1, cache );
142+
( void )model->mimeTypes();
143143
Q_ASSERT( model->parent( QModelIndex() ) == QModelIndex() );
144144
Q_ASSERT( model->rowCount() >= 0 );
145145
QVariant variant;
146-
model->setData( QModelIndex(), variant, -1 );
147-
model->setHeaderData( -1, Qt::Horizontal, QVariant() );
148-
model->setHeaderData( 999999, Qt::Horizontal, QVariant() );
146+
( void )model->setData( QModelIndex(), variant, -1 );
147+
( void )model->setHeaderData( -1, Qt::Horizontal, QVariant() );
148+
( void )model->setHeaderData( 999999, Qt::Horizontal, QVariant() );
149149
QMap<int, QVariant> roles;
150-
model->sibling( 0, 0, QModelIndex() );
151-
model->span( QModelIndex() );
152-
model->supportedDropActions();
150+
( void )model->sibling( 0, 0, QModelIndex() );
151+
( void )model->span( QModelIndex() );
152+
( void )model->supportedDropActions();
153153
}
154154

155155
/*!

0 commit comments

Comments
 (0)