Skip to content
Permalink
Browse files

fix warnings

git-svn-id: http://svn.osgeo.org/qgis/trunk@12541 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Dec 20, 2009
1 parent a81156f commit b2b6104dcab2deee61049fc97160754ac416c08b
@@ -75,7 +75,7 @@ IF (WITH_BINDINGS)
SET (BINDINGS_GLOBAL_INSTALL FALSE CACHE BOOL "Install bindings to global python directory? (might need root)")
ENDIF (WITH_BINDINGS)

# Compile flag. Make it posible to turn it off.
# Compile flag. Make it possible to turn it off.
SET (PEDANTIC FALSE CACHE BOOL "Determines if we should compile in pedantic mode.")

# whether unit tests should be build
@@ -214,8 +214,9 @@ IF (PEDANTIC)
ADD_DEFINITIONS( /wd4510 ) # default constructor could not be generated (sqlite3_index_info, QMap)
ADD_DEFINITIONS( /wd4512 ) # assignment operator could not be generated (sqlite3_index_info)
ADD_DEFINITIONS( /wd4610 ) # user defined constructor required (sqlite3_index_info)
ADD_DEFINITIONS( /wd4706 ) # assignment within conditional expression (pal)
ELSE (MSVC)
ADD_DEFINITIONS( -Wall -Wno-long-long -Wformat-security )
ADD_DEFINITIONS( -Wall -Wno-long-long -Wformat-security -Wno-strict-aliasing )
# Qt produces lots of warnings with strict aliasing (as of Qt 4.4.0 & GCC 4.3)
# ADD_DEFINITIONS( -fstrict-aliasing -Wstrict-aliasing=1 )
ENDIF (MSVC)
@@ -284,7 +285,7 @@ ENDIF (WIN32)

#assume we have excaped compiler directives
#eventually we want to change this to new
#since we dont need to jump through so many
#since we don't need to jump through so many
#hoops to escape compiler directives then
IF(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
@@ -384,7 +384,7 @@ bool NormVecDecorator::estimateFirstDerivative( int pointno )
if ( !vlist )
{
//something went wrong in getSurroundingTriangles, set the normal to (0,0,0)
if ( mNormVec->size() <= mNormVec->count() )//allocate more memory if neccessary
if ( mNormVec->size() <= mNormVec->count() )//allocate more memory if necessary
{
QgsDebugMsg( QString( "resizing mNormVec from %1 to %2" ).arg( mNormVec->size() ).arg( mNormVec->size() + 1 ) );
mNormVec->resize( mNormVec->size() + 1 );
@@ -474,15 +474,15 @@ bool NormVecDecorator::estimateFirstDerivative( int pointno )
{
status = ENDPOINT;
}
else if ( numberofbreaks > 1 )
else
{
status = BREAKLINE;
}

delete vlist;

//insert the new calculated vector
if ( mNormVec->size() <= mNormVec->count() )//allocate more memory if neccessary
if ( mNormVec->size() <= mNormVec->count() )//allocate more memory if necessary
{
mNormVec->resize( mNormVec->size() + 1 );
}
@@ -408,7 +408,7 @@ bool QgsGeometryAnalyzer::convexHull( QgsVectorLayer* layer, const QString& shap

QgsVectorFileWriter vWriter( shapefileName, dp->encoding(), fields, outputType, &crs );
QgsFeature currentFeature;
QgsGeometry* dissolveGeometry; //dissolve geometry
QgsGeometry* dissolveGeometry = 0; //dissolve geometry
QMultiMap<QString, int> map;

if ( onlySelectedFeatures )
@@ -493,6 +493,11 @@ bool QgsGeometryAnalyzer::convexHull( QgsVectorLayer* layer, const QString& shap
++jt;
}
QList<double> values;
if( !dissolveGeometry )
{
QgsDebugMsg( "no dissolved geometry - should not happen" );
return false;
}
dissolveGeometry = dissolveGeometry->convexHull();
values = simpleMeasure( dissolveGeometry );
QgsAttributeMap attributeMap;
@@ -534,6 +539,11 @@ bool QgsGeometryAnalyzer::convexHull( QgsVectorLayer* layer, const QString& shap
}
QList<double> values;
// QgsGeometry* tmpGeometry = 0;
if( !dissolveGeometry )
{
QgsDebugMsg( "no dissolved geometry - should not happen" );
return false;
}
dissolveGeometry = dissolveGeometry->convexHull();
// values = simpleMeasure( tmpGeometry );
values = simpleMeasure( dissolveGeometry );
@@ -629,7 +639,7 @@ bool QgsGeometryAnalyzer::dissolve( QgsVectorLayer* layer, const QString& shapef
}
}

QgsGeometry* dissolveGeometry; //dissolve geometry
QgsGeometry *dissolveGeometry = 0; //dissolve geometry
QMultiMap<QString, int>::const_iterator jt = map.constBegin();
QgsFeature outputFeature;
while ( jt != map.constEnd() )
@@ -237,7 +237,6 @@ namespace pal
{
modMutex->unlock();
throw new PalException::FeatureExists();
return false;
}

// Split MULTI GEOM and Collection in simple geometries
@@ -105,7 +105,7 @@ int QgsRasterTransparency::alphaValue( double theValue, int theGlobalTransparenc

//Search through he transparency list looking for a match
bool myTransparentPixelFound = false;
TransparentSingleValuePixel myTransparentPixel;
TransparentSingleValuePixel myTransparentPixel = {0,100};
for ( int myListRunner = 0; myListRunner < mTransparentSingleValuePixelList.count(); myListRunner++ )
{
myTransparentPixel = mTransparentSingleValuePixelList[myListRunner];
@@ -143,7 +143,7 @@ int QgsRasterTransparency::alphaValue( double theRedValue, double theGreenValue,

//Search through he transparency list looking for a match
bool myTransparentPixelFound = false;
TransparentThreeValuePixel myTransparentPixel;
TransparentThreeValuePixel myTransparentPixel = {0,0,0,100};
for ( int myListRunner = 0; myListRunner < mTransparentThreeValuePixelList.count(); myListRunner++ )
{
myTransparentPixel = mTransparentThreeValuePixelList[myListRunner];

0 comments on commit b2b6104

Please sign in to comment.
You can’t perform that action at this time.