Oracle provider: fix compiler warnings

- Remove use of surfaceType variable that is never read
- Avoid self assignment of nRings variable
This commit is contained in:
Even Rouault 2020-01-20 20:50:40 +01:00 committed by Nyall Dawson
parent 4f41ba2fcb
commit f84d90d06d

View File

@ -2180,19 +2180,18 @@ void QgsOracleProvider::appendGeomParam( const QgsGeometry &geom, QSqlQuery &qry
{ {
g.gtype = SDO_GTYPE( dim, GtPolygon ); g.gtype = SDO_GTYPE( dim, GtPolygon );
int nSurfaces = 1; int nSurfaces = 1;
QgsWkbTypes::Type surfaceType = type;
if ( type == QgsWkbTypes::MultiSurface || type == QgsWkbTypes::MultiSurfaceZ ) if ( type == QgsWkbTypes::MultiSurface || type == QgsWkbTypes::MultiSurfaceZ )
{ {
g.gtype = SDO_GTYPE( dim, GtMultiPolygon ); g.gtype = SDO_GTYPE( dim, GtMultiPolygon );
nSurfaces = *ptr.iPtr++; nSurfaces = *ptr.iPtr++;
ptr.ucPtr++; // Skip endianness of first surface 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++ ) for ( int iSurface = 0; iSurface < nSurfaces; iSurface++ )
{ {
int nRings = nRings = *ptr.iPtr++; const int nRings = *ptr.iPtr++;
ptr.ucPtr++; // Skip endianness of first ring ptr.ucPtr++; // Skip endianness of first ring
QgsWkbTypes::Type ringType = ( QgsWkbTypes::Type ) * ptr.iPtr++; // type of first ring QgsWkbTypes::Type ringType = ( QgsWkbTypes::Type ) * ptr.iPtr++; // type of first ring
@ -2245,8 +2244,6 @@ void QgsOracleProvider::appendGeomParam( const QgsGeometry &geom, QSqlQuery &qry
ringType = lineType; // type of next curve ringType = lineType; // type of next curve
} }
surfaceType = lineType;
} }
} }
break; break;