Skip to content

Commit

Permalink
fix more warnings
Browse files Browse the repository at this point in the history
(layers might be miscounted in qgsowsdataitems.cpp)
  • Loading branch information
jef-n committed Aug 1, 2012
1 parent ba57579 commit 5a43d74
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 8 deletions.
2 changes: 2 additions & 0 deletions src/core/gps/qgsgpsdetector.h
Expand Up @@ -26,8 +26,10 @@
// qextserialport.h includes windows.h,
// which defines min()/max() macros w/o NOMINMAX,
// which in turn breaks limits std::numeric_limits<T>::min()/max()
#ifndef NOMINMAX
#define NOMINMAX
#endif
#endif

#include "qextserialport.h"

Expand Down
4 changes: 2 additions & 2 deletions src/core/qgsclipper.cpp
Expand Up @@ -45,9 +45,9 @@ unsigned char* QgsClipper::clippedLineWKB( unsigned char* wkb, const QgsRectangl

bool hasZValue = ( wkbType == QGis::WKBLineString25D );

double p0x, p0y, p1x, p1y; //original coordinates
double p0x, p0y, p1x = 0.0, p1y = 0.0; //original coordinates
double p1x_c, p1y_c; //clipped end coordinates
double lastClipX, lastClipY; //last successfully clipped coords
double lastClipX = 0.0, lastClipY = 0.0; //last successfully clipped coords

line.reserve( nPoints + 1 );
line.clear();
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsgeometry.cpp
Expand Up @@ -5566,7 +5566,7 @@ GEOSGeometry* QgsGeometry::reshapeLine( const GEOSGeometry* line, const GEOSGeom
return 0;
}

bool atLeastTwoIntersections;
bool atLeastTwoIntersections = false;

try
{
Expand Down
2 changes: 1 addition & 1 deletion src/mapserver/qgssldparser.cpp
Expand Up @@ -1598,7 +1598,7 @@ QgsVectorOverlay* QgsSLDParser::vectorOverlayFromDiagramSymbolizer( const QDomEl
QList<QgsDiagramItem> theItems;
QList<int> scalingAttributes;
QgsAttributeList factoryCategoryAttributes;
QgsDiagramRenderer::ItemInterpretation interpretation; //discrete or linear
QgsDiagramRenderer::ItemInterpretation interpretation = QgsDiagramRenderer::DISCRETE; //discrete or linear

//scale
double scaleFactor = scaleFactorFromScaleTag( diagramElem.namedItem( "Scale" ).toElement() );
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/heatmap/heatmapgui.cpp
Expand Up @@ -283,7 +283,7 @@ void HeatmapGui::updateBBox()
mBBox = inputLayer->extent();
QgsCoordinateReferenceSystem layerCrs = inputLayer->crs();

float radiusInMapUnits;
float radiusInMapUnits = 0.0;
if ( useRadius->isChecked() )
{
float maxInField = inputLayer->maximumValue( radiusFieldCombo->itemData( radiusFieldCombo->currentIndex() ).toInt() ).toFloat();
Expand Down
2 changes: 1 addition & 1 deletion src/providers/ows/qgsowsdataitems.cpp
Expand Up @@ -29,7 +29,7 @@ QVector<QgsDataItem*> QgsOWSConnectionItem::createChildren()

QVector<QgsDataItem*> serviceItems;

int layerCount;
int layerCount = 0;
// Try to open with WMS,WFS,WCS
foreach( QString key, QStringList() << "wms" << "WFS" << "gdal" )
{
Expand Down
4 changes: 2 additions & 2 deletions src/providers/postgres/qgspostgresprovider.cpp
Expand Up @@ -1821,7 +1821,8 @@ QString QgsPostgresProvider::geomParam( int offset ) const
{
QString geometry;

bool forceMulti;
bool forceMulti = false;

switch ( geometryType() )
{
case QGis::WKBPoint:
Expand All @@ -1845,7 +1846,6 @@ QString QgsPostgresProvider::geomParam( int offset ) const
break;
}


if ( forceMulti )
{
geometry += mConnectionRO->majorVersion() < 2 ? "multi(" : "st_multi(";
Expand Down

0 comments on commit 5a43d74

Please sign in to comment.