mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
Fix logically dead code identified by Coverity
This commit is contained in:
parent
a80cca0fb3
commit
737c92ddbb
@ -635,8 +635,6 @@ bool QgsDwgImporter::import( const QString &drawing, QString &error, bool doExpa
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( result != DRW::BAD_NONE )
|
||||
{
|
||||
switch ( result )
|
||||
{
|
||||
case DRW::BAD_NONE:
|
||||
@ -681,9 +679,9 @@ bool QgsDwgImporter::import( const QString &drawing, QString &error, bool doExpa
|
||||
break;
|
||||
}
|
||||
|
||||
QgsDebugMsg( QString( "error:%1" ).arg( error ) );
|
||||
|
||||
if ( result != DRW::BAD_NONE )
|
||||
{
|
||||
QgsDebugMsg( QString( "error:%1" ).arg( error ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -2553,7 +2551,7 @@ bool QgsDwgImporter::expandInserts( QString &error )
|
||||
|
||||
OGRFeatureH insert = nullptr;
|
||||
int i = 0, errors = 0;
|
||||
for ( int i = 0, errors = 0; true; ++i )
|
||||
for ( int i = 0; true; ++i )
|
||||
{
|
||||
if ( i % 1000 == 0 )
|
||||
{
|
||||
@ -2731,18 +2729,12 @@ bool QgsDwgImporter::expandInserts( QString &error )
|
||||
++j;
|
||||
}
|
||||
|
||||
if ( f )
|
||||
OGR_F_Destroy( f );
|
||||
|
||||
OGR_DS_ReleaseResultSet( mDs, src );
|
||||
|
||||
QgsDebugMsgLevel( QString( "%1: %2 features copied" ).arg( name ).arg( j ), 5 );
|
||||
}
|
||||
}
|
||||
|
||||
if ( insert )
|
||||
OGR_F_Destroy( insert );
|
||||
|
||||
if ( errors > 0 )
|
||||
{
|
||||
error = QObject::tr( "%1 write errors during block expansion" ).arg( errors );
|
||||
|
@ -485,9 +485,6 @@ namespace QgsWfs
|
||||
respElem.appendChild( trElem );
|
||||
|
||||
return resp;
|
||||
|
||||
|
||||
return doc;
|
||||
}
|
||||
|
||||
namespace
|
||||
|
Loading…
x
Reference in New Issue
Block a user