Skip to content

Commit

Permalink
Oracle provider: fix compiler warnings
Browse files Browse the repository at this point in the history
- Remove use of surfaceType variable that is never read
- Avoid self assignment of nRings variable
  • Loading branch information
rouault authored and nyalldawson committed Jan 21, 2020
1 parent 4f41ba2 commit f84d90d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/providers/oracle/qgsoracleprovider.cpp
Expand Up @@ -2180,19 +2180,18 @@ void QgsOracleProvider::appendGeomParam( const QgsGeometry &geom, QSqlQuery &qry
{
g.gtype = SDO_GTYPE( dim, GtPolygon );
int nSurfaces = 1;
QgsWkbTypes::Type surfaceType = type;
if ( type == QgsWkbTypes::MultiSurface || type == QgsWkbTypes::MultiSurfaceZ )
{
g.gtype = SDO_GTYPE( dim, GtMultiPolygon );
nSurfaces = *ptr.iPtr++;

ptr.ucPtr++; // Skip endianness of first surface
surfaceType = ( QgsWkbTypes::Type ) * ptr.iPtr++; // type of first surface
ptr.iPtr++; // Skip type of first surface
}

for ( int iSurface = 0; iSurface < nSurfaces; iSurface++ )
{
int nRings = nRings = *ptr.iPtr++;
const int nRings = *ptr.iPtr++;

ptr.ucPtr++; // Skip endianness of first ring
QgsWkbTypes::Type ringType = ( QgsWkbTypes::Type ) * ptr.iPtr++; // type of first ring
Expand Down Expand Up @@ -2245,8 +2244,6 @@ void QgsOracleProvider::appendGeomParam( const QgsGeometry &geom, QSqlQuery &qry

ringType = lineType; // type of next curve
}

surfaceType = lineType;
}
}
break;
Expand Down

0 comments on commit f84d90d

Please sign in to comment.