[QGIS Commit] r12541 - in trunk/qgis: . src/analysis/interpolation
src/analysis/vector src/core/pal src/core/raster
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Sun Dec 20 11:42:04 EST 2009
Author: jef
Date: 2009-12-20 11:42:03 -0500 (Sun, 20 Dec 2009)
New Revision: 12541
Modified:
trunk/qgis/CMakeLists.txt
trunk/qgis/src/analysis/interpolation/NormVecDecorator.cc
trunk/qgis/src/analysis/vector/qgsgeometryanalyzer.cpp
trunk/qgis/src/core/pal/layer.cpp
trunk/qgis/src/core/raster/qgsrastertransparency.cpp
Log:
fix warnings
Modified: trunk/qgis/CMakeLists.txt
===================================================================
--- trunk/qgis/CMakeLists.txt 2009-12-20 16:35:45 UTC (rev 12540)
+++ trunk/qgis/CMakeLists.txt 2009-12-20 16:42:03 UTC (rev 12541)
@@ -75,7 +75,7 @@
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 @@
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 @@
#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)
Modified: trunk/qgis/src/analysis/interpolation/NormVecDecorator.cc
===================================================================
--- trunk/qgis/src/analysis/interpolation/NormVecDecorator.cc 2009-12-20 16:35:45 UTC (rev 12540)
+++ trunk/qgis/src/analysis/interpolation/NormVecDecorator.cc 2009-12-20 16:42:03 UTC (rev 12541)
@@ -384,7 +384,7 @@
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,7 +474,7 @@
{
status = ENDPOINT;
}
- else if ( numberofbreaks > 1 )
+ else
{
status = BREAKLINE;
}
@@ -482,7 +482,7 @@
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 );
}
Modified: trunk/qgis/src/analysis/vector/qgsgeometryanalyzer.cpp
===================================================================
--- trunk/qgis/src/analysis/vector/qgsgeometryanalyzer.cpp 2009-12-20 16:35:45 UTC (rev 12540)
+++ trunk/qgis/src/analysis/vector/qgsgeometryanalyzer.cpp 2009-12-20 16:42:03 UTC (rev 12541)
@@ -408,7 +408,7 @@
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 @@
++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 @@
}
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 @@
}
}
- QgsGeometry* dissolveGeometry; //dissolve geometry
+ QgsGeometry *dissolveGeometry = 0; //dissolve geometry
QMultiMap<QString, int>::const_iterator jt = map.constBegin();
QgsFeature outputFeature;
while ( jt != map.constEnd() )
Modified: trunk/qgis/src/core/pal/layer.cpp
===================================================================
--- trunk/qgis/src/core/pal/layer.cpp 2009-12-20 16:35:45 UTC (rev 12540)
+++ trunk/qgis/src/core/pal/layer.cpp 2009-12-20 16:42:03 UTC (rev 12541)
@@ -237,7 +237,6 @@
{
modMutex->unlock();
throw new PalException::FeatureExists();
- return false;
}
// Split MULTI GEOM and Collection in simple geometries
Modified: trunk/qgis/src/core/raster/qgsrastertransparency.cpp
===================================================================
--- trunk/qgis/src/core/raster/qgsrastertransparency.cpp 2009-12-20 16:35:45 UTC (rev 12540)
+++ trunk/qgis/src/core/raster/qgsrastertransparency.cpp 2009-12-20 16:42:03 UTC (rev 12541)
@@ -105,7 +105,7 @@
//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 @@
//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];
More information about the QGIS-commit
mailing list