Skip to content

Commit

Permalink
Some very minor Coverity related fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Feb 16, 2015
1 parent da092bf commit 2d8feeb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
2 changes: 0 additions & 2 deletions src/providers/ogr/qgsogrprovider.cpp
Expand Up @@ -650,7 +650,6 @@ QStringList QgsOgrProvider::subLayers() const
OGRFeatureH fet;
while (( fet = OGR_L_GetNextFeature( layer ) ) )
{
if ( !fet ) continue;
OGRGeometryH geom = OGR_F_GetGeometryRef( fet );
if ( geom )
{
Expand Down Expand Up @@ -2502,7 +2501,6 @@ void QgsOgrProvider::recalculateFeatureCount()
OGRFeatureH fet;
while (( fet = OGR_L_GetNextFeature( ogrLayer ) ) )
{
if ( !fet ) continue;
OGRGeometryH geom = OGR_F_GetGeometryRef( fet );
if ( geom )
{
Expand Down
24 changes: 12 additions & 12 deletions tests/qt_modeltest/modeltest.cpp
Expand Up @@ -133,23 +133,23 @@ void ModelTest::nonDestructiveBasicTest()
Qt::ItemFlags flags = model->flags( QModelIndex() );
Q_ASSERT( flags == Qt::ItemIsDropEnabled || flags == 0 );
( void )model->hasChildren( QModelIndex() );
model->hasIndex( 0, 0 );
model->headerData( 0, Qt::Horizontal );
model->index( 0, 0 );
model->itemData( QModelIndex() );
( void )model->hasIndex( 0, 0 );
( void )model->headerData( 0, Qt::Horizontal );
( void )model->index( 0, 0 );
( void )model->itemData( QModelIndex() );
QVariant cache;
model->match( QModelIndex(), -1, cache );
model->mimeTypes();
( void )model->match( QModelIndex(), -1, cache );
( void )model->mimeTypes();
Q_ASSERT( model->parent( QModelIndex() ) == QModelIndex() );
Q_ASSERT( model->rowCount() >= 0 );
QVariant variant;
model->setData( QModelIndex(), variant, -1 );
model->setHeaderData( -1, Qt::Horizontal, QVariant() );
model->setHeaderData( 999999, Qt::Horizontal, QVariant() );
( void )model->setData( QModelIndex(), variant, -1 );
( void )model->setHeaderData( -1, Qt::Horizontal, QVariant() );
( void )model->setHeaderData( 999999, Qt::Horizontal, QVariant() );
QMap<int, QVariant> roles;
model->sibling( 0, 0, QModelIndex() );
model->span( QModelIndex() );
model->supportedDropActions();
( void )model->sibling( 0, 0, QModelIndex() );
( void )model->span( QModelIndex() );
( void )model->supportedDropActions();
}

/*!
Expand Down

0 comments on commit 2d8feeb

Please sign in to comment.