compilation-warnings-and-cleanup-r9120.patch

Patch enabling stricter compilation mode and cleaning number of warnings - Mateusz Loskot -, 2008-08-22 05:20 AM

Download (45.5 KB)

View differences:

qgis/src/app/qgsmeasuredialog.h (working copy)
26 26

  
27 27
class QgsMeasureDialog : public QDialog, private Ui::QgsMeasureBase
28 28
{
29
  Q_OBJECT;
29
  Q_OBJECT
30 30

  
31 31
public:
32 32

  
qgis/src/app/qgsmaptoolsplitfeatures.h (working copy)
22 22
/**A map tool that draws a line and splits the features cut by the line*/
23 23
class QgsMapToolSplitFeatures: public QgsMapToolCapture
24 24
{
25
  Q_OBJECT;
25
  Q_OBJECT
26 26
 public:
27 27
  QgsMapToolSplitFeatures(QgsMapCanvas* canvas);
28 28
  virtual ~QgsMapToolSplitFeatures();
qgis/src/app/qgisapp.h (working copy)
68 68
 */
69 69
class QgisApp : public QMainWindow
70 70
{
71
  Q_OBJECT;
71
  Q_OBJECT
72 72
  public:
73 73
  //! Constructor
74 74
  QgisApp(QSplashScreen *splash, QWidget * parent = 0, Qt::WFlags fl = Qt::Window);
qgis/src/app/legend/qgslegendlayerfile.h (working copy)
32 32
*/
33 33
class QgsLegendLayerFile : public QgsLegendItem
34 34
{
35
  Q_OBJECT;
35
  Q_OBJECT
36 36
  
37 37
public:
38 38
    QgsLegendLayerFile(QTreeWidgetItem * theLegendItem, QString theString, QgsMapLayer* theLayer);
qgis/src/app/legend/qgslegend.h (working copy)
82 82

  
83 83
class QgsLegend : public QTreeWidget
84 84
{
85
    Q_OBJECT;
85
    Q_OBJECT
86 86
 private:
87 87
    // Moved here to match access of declaration later in file.
88 88
    // Previous location raised a warning in msvc as the forward
qgis/src/app/qgsidentifyresults.h (working copy)
36 36

  
37 37
class QgsIdentifyResults: public QDialog, private Ui::QgsIdentifyResultsBase
38 38
{
39
  Q_OBJECT;
39
  Q_OBJECT
40 40
  public:
41 41

  
42 42
  //! Constructor - takes it own copy of the QgsAttributeAction so
qgis/src/app/qgsattributetable.cpp (working copy)
33 33

  
34 34

  
35 35
QgsAttributeTableItemDelegate::QgsAttributeTableItemDelegate(QgsAttributeTable *table, QObject *parent)
36
  : mTable(table), QItemDelegate(parent)
36
  : QItemDelegate(parent), mTable(table)
37 37
{
38 38
}
39 39

  
......
429 429

  
430 430
void QgsAttributeTable::fillTable(QgsVectorLayer *layer)
431 431
{
432
  int row = 0;
433

  
434 432
  const QgsFieldMap &fields = layer->pendingFields();
435 433

  
436 434
	// set up the column headers
qgis/src/app/qgsvectorlayerproperties.h (working copy)
35 35

  
36 36
class QgsVectorLayerProperties : public QDialog, private Ui::QgsVectorLayerPropertiesBase
37 37
{
38
  Q_OBJECT;
38
  Q_OBJECT
39 39
public:
40 40
  QgsVectorLayerProperties(QgsVectorLayer *lyr = 0,QWidget *parent = 0, Qt::WFlags fl = QgisGui::ModalDialogFlags);
41 41
  ~QgsVectorLayerProperties();
qgis/src/app/qgsmaptooledit.cpp (working copy)
35 35

  
36 36
int QgsMapToolEdit::insertSegmentVerticesForSnap(const QList<QgsSnappingResult>& snapResults, QgsVectorLayer* editedLayer)
37 37
{
38
  int returnval = 0;
39 38
  QgsPoint layerPoint;
40 39

  
41 40
  if(!editedLayer || !editedLayer->isEditable())
qgis/src/app/qgssearchquerybuilder.cpp (working copy)
119 119
  mModelValues->blockSignals(true);
120 120
  lstValues->setUpdatesEnabled(false);
121 121
  
122
  const int limitval = static_cast<int>(limit);
122 123
  while (provider->getNextFeature(feat) &&
123
         (limit == 0 || mModelValues->rowCount() != limit))
124
         (limitval == 0 || mModelValues->rowCount() != limitval))
124 125
  {
125 126
    const QgsAttributeMap& attributes = feat.attributeMap();
126 127
    value = attributes[fieldIndex].toString();
qgis/src/app/qgsrasterlayerproperties.cpp (working copy)
52 52

  
53 53
QgsRasterLayerProperties::QgsRasterLayerProperties(QgsMapLayer *lyr, QWidget *parent, Qt::WFlags fl)
54 54
  : QDialog(parent, fl), 
55
  mRasterLayer( dynamic_cast<QgsRasterLayer*>(lyr)),
56 55
  // Constant that signals property not used.
57
  TRSTRING_NOT_SET( tr("Not Set"))
56
  TRSTRING_NOT_SET( tr("Not Set")),
57
  mRasterLayer( dynamic_cast<QgsRasterLayer*>(lyr))
58 58
{
59 59
  ignoreSpinBoxEvent = false; //Short circuit signal loop between min max field and stdDev spin box
60 60
  mGrayActualMinimumMaximum = false;
qgis/src/app/qgsdbsourceselect.h (working copy)
103 103
	dbssType=0,
104 104
	dbssDetail,
105 105
	dbssSql,
106
	dbssColumns,
106
	dbssColumns
107 107
    };
108 108

  
109 109
    typedef std::pair<QString, QString> geomPair;
qgis/src/app/qgsattributetable.h (working copy)
57 57
    enum {
58 58
      AttributeIndex = Qt::UserRole,
59 59
      AttributeName = Qt::UserRole+1,
60
      AttributeType = Qt::UserRole+2,
60
      AttributeType = Qt::UserRole+2
61 61
    };
62 62

  
63 63
    void setReadOnly(bool b);
qgis/src/app/qgsdbtablemodel.h (working copy)
24 24
The tables have the following columns: Type, Schema, Tablename, Geometry Column, Sql*/
25 25
class QgsDbTableModel: public QStandardItemModel
26 26
{
27
  Q_OBJECT;
27
  Q_OBJECT
28 28
 public:
29 29
  QgsDbTableModel();
30 30
  ~QgsDbTableModel();
qgis/src/app/qgsattributedialog.cpp (working copy)
38 38
QgsAttributeDialog::QgsAttributeDialog(QgsVectorLayer *vl, QgsFeature *thepFeature)
39 39
  : QDialog(),
40 40
    mSettingsPath("/Windows/AttributeDialog/"),
41
    mpFeature(thepFeature),
42
    mLayer(vl)
41
    mLayer(vl),
42
    mpFeature(thepFeature)
43 43
{
44 44
  setupUi(this);
45 45
  if (mpFeature==NULL || vl->getDataProvider()==NULL )
qgis/src/app/qgsmaptoolvertexedit.h (working copy)
26 26
QgsMapToolDeleteVertex*/
27 27
class QgsMapToolVertexEdit: public QgsMapToolEdit
28 28
{
29
  Q_OBJECT;
29
  Q_OBJECT
30 30

  
31 31
 public:
32 32

  
qgis/src/app/qgspastetransformations.h (working copy)
27 27
 */
28 28
class QgsPasteTransformations : public QDialog, private Ui::QgsPasteTransformationsBase
29 29
{
30
  Q_OBJECT;
30
  Q_OBJECT
31 31
 public:
32 32
    //! Constructor
33 33
    QgsPasteTransformations();
qgis/src/app/qgsoptions.h (working copy)
29 29
 */
30 30
class QgsOptions :public QDialog, private Ui::QgsOptionsBase
31 31
{
32
  Q_OBJECT;
32
  Q_OBJECT
33 33
  public:
34 34
    /**
35 35
     * Constructor
qgis/src/app/qgslabeldialog.h (working copy)
26 26
/** QgsLabelDialog is the dialog for label. */
27 27
class QgsLabelDialog: public QWidget, private Ui::QgsLabelDialogBase
28 28
{
29
    Q_OBJECT;
29
    Q_OBJECT
30 30

  
31 31
public:
32 32
    QgsLabelDialog( QgsLabel *label,  QWidget * parent = 0 );
qgis/src/app/qgisappinterface.h (working copy)
32 32
 */
33 33
class QgisAppInterface : public QgisInterface
34 34
{
35
    Q_OBJECT;
35
    Q_OBJECT
36 36

  
37 37
    public:
38 38
        /**
qgis/src/app/qgsattributeactiondialog.h (working copy)
32 32

  
33 33
class QgsAttributeActionDialog: public QWidget, private Ui::QgsAttributeActionDialogBase
34 34
{
35
  Q_OBJECT;
35
  Q_OBJECT
36 36
  
37 37
 public:
38 38
  QgsAttributeActionDialog(QgsAttributeAction* actions, 
qgis/src/app/qgsattributedialog.h (working copy)
31 31

  
32 32
class QgsAttributeDialog: public QDialog, private Ui::QgsAttributeDialogBase
33 33
{
34
  Q_OBJECT;
34
  Q_OBJECT
35 35

  
36 36
  public:
37 37
  QgsAttributeDialog(QgsVectorLayer *vl, QgsFeature * thepFeature);
qgis/src/app/qgisapp.cpp (working copy)
314 314
  QgisApp::QgisApp(QSplashScreen *splash, QWidget * parent, Qt::WFlags fl)
315 315
: QMainWindow(parent,fl),
316 316
  mSplash(splash),
317
  mPythonUtils(NULL), mPythonConsole(NULL)
317
  mPythonConsole(NULL),
318
  mPythonUtils(NULL)
318 319
{
319 320
  if(smInstance) {
320 321
    QMessageBox::critical(
......
2451 2452
      break;
2452 2453
  }
2453 2454

  
2454
}; // findLayer_
2455
} // findLayer_
2455 2456

  
2456 2457

  
2457 2458

  
qgis/src/app/qgsmeasuretool.h (working copy)
29 29

  
30 30
class QgsMeasureTool : public QgsMapTool
31 31
{
32
  Q_OBJECT;
32
  Q_OBJECT
33 33

  
34 34
public:
35 35
  
qgis/src/app/qgsabout.cpp (working copy)
215 215
#ifdef QGISDEBUG 
216 216
  printf ("Loading mug: %s\n", myString.toLocal8Bit().constData()); 
217 217
#endif 
218
  QPixmap *pixmap = new QPixmap(myString);
219
  //pixAuthorMug->setPixmap(*pixmap);
218
  
220 219
  /* Uncomment this block to use preloaded images
221 220
  pixAuthorMug->setPixmap(mugs[myString]);
222 221
  */
qgis/src/app/qgsmaptoolidentify.h (working copy)
39 39
*/
40 40
class QgsMapToolIdentify : public QgsMapTool
41 41
{
42
  Q_OBJECT;
42
  Q_OBJECT
43 43

  
44 44
  public:
45 45
    QgsMapToolIdentify(QgsMapCanvas* canvas);
qgis/src/plugins/spit/qgsspit.h (working copy)
37 37

  
38 38
class QgsSpit : public QDialog, private Ui::QgsSpitBase
39 39
{
40
  Q_OBJECT;
40
  Q_OBJECT
41 41
public:
42 42
  QgsSpit( QWidget *parent = 0, Qt::WFlags fl = 0 );
43 43
  ~QgsSpit();
......
124 124

  
125 125
class ShapefileTableDelegate : public QItemDelegate
126 126
{
127
  Q_OBJECT;
127
  Q_OBJECT
128 128

  
129 129
 public:
130 130
  ShapefileTableDelegate(QObject *parent, QStringList& schema_list) :
qgis/src/plugins/quick_print/quickprintgui.cpp (working copy)
28 28
//standard includes
29 29

  
30 30
QuickPrintGui::QuickPrintGui( QgsMapCanvas * thepMapCanvas, 
31
    QWidget* parent,  Qt::WFlags fl )
32
: mpMapCanvas ( thepMapCanvas ), QDialog ( parent, fl ) 
31
    QWidget* parent,  Qt::WFlags fl ) :
32
        QDialog ( parent, fl ), mpMapCanvas ( thepMapCanvas )
33 33
{
34 34
  setupUi(this);
35 35
  grpOuput->hide();  //until properly implemented
qgis/src/plugins/quick_print/quickprintplugin.h (working copy)
57 57
*/
58 58
class QuickPrintPlugin:public QObject, public QgisPlugin
59 59
{
60
  Q_OBJECT;
60
  Q_OBJECT
61 61
  public:
62 62
      
63 63
  //////////////////////////////////////////////////////////////////////
qgis/src/plugins/dxf2shp_converter/dxf2shpconvertergui.cpp (working copy)
125 125

  
126 126
void dxf2shpConverterGui::on_buttonBox_helpRequested()
127 127
{
128
  // FIXME - mloskot: Ticket #1235
128 129
  QString s = "Fields description:\n"
129 130
  "* Input DXF file: path to the DXF file to be converted\n" 
130 131
  "* Output Shp file: desired filename of the ShapeFile to be created\n"
qgis/src/plugins/dxf2shp_converter/dxf2shpconverter.h (working copy)
34 34
 */
35 35
class dxf2shpConverter: public QObject, public QgisPlugin
36 36
{
37
  Q_OBJECT;
37
  Q_OBJECT
38 38
  public:
39 39

  
40 40
  //////////////////////////////////////////////////////////////////////
qgis/src/plugins/dxf2shp_converter/builder.cpp (working copy)
400 400
    return;
401 401
  }
402 402

  
403
  // FIXME - Ticket #1236
403 404
  logfile << "(Add Circle  (%6.3f, %6.3f, %6.3f) %6.3f\n", data.cx, data.cy, data.cz, data.radius;
404 405

  
405 406
  if (ignoringBlock)
qgis/src/plugins/dxf2shp_converter/dxflib/src/dl_writer_ascii.cpp (working copy)
58 58
 */
59 59
void DL_WriterA::dxfReal(int gc, double value) const {
60 60
    char str[256];
61
    sprintf(str, "%.16lf", value);
61
    sprintf(str, "%.16f", value);
62 62
	
63 63
	// fix for german locale:
64 64
	strReplace(str, ',', '.');
qgis/src/plugins/copyright_label/plugingui.h (working copy)
21 21
*/
22 22
class QgsCopyrightLabelPluginGui : public QDialog, private Ui::QgsCopyrightLabelPluginGuiBase
23 23
{
24
Q_OBJECT;
24
Q_OBJECT
25 25
public:
26 26
    QgsCopyrightLabelPluginGui( QWidget* parent = 0, Qt::WFlags fl = 0 );
27 27
    ~QgsCopyrightLabelPluginGui();
qgis/src/plugins/coordinate_capture/coordinatecapturemaptool.h (working copy)
30 30
*/
31 31
class CoordinateCaptureMapTool : public QgsMapTool
32 32
{
33
  Q_OBJECT;
33
  Q_OBJECT
34 34

  
35 35
  public:
36 36
    CoordinateCaptureMapTool(QgsMapCanvas* thepCanvas);
qgis/src/plugins/coordinate_capture/coordinatecapture.h (working copy)
61 61
*/
62 62
class CoordinateCapture:public QObject, public QgisPlugin
63 63
{
64
  Q_OBJECT;
64
  Q_OBJECT
65 65
  public:
66 66
      
67 67
  //////////////////////////////////////////////////////////////////////
qgis/src/plugins/scale_bar/plugingui.h (working copy)
20 20
*/
21 21
class QgsScaleBarPluginGui : public QDialog, private Ui::QgsScaleBarPluginGuiBase
22 22
{
23
Q_OBJECT;
23
Q_OBJECT
24 24
public:
25 25
    QgsScaleBarPluginGui( QWidget* parent = 0, Qt::WFlags fl = 0 );
26 26
    ~QgsScaleBarPluginGui();
qgis/src/gui/qgsquickprint.cpp (working copy)
132 132
  // the screen resolution is which we store and then 
133 133
  // reset the resolution of the printer after that...
134 134
  QPrinter myPrinter ( QPrinter::ScreenResolution ); 
135
  int myScreenResolutionDpi = myPrinter.resolution(); //try to get programmatically
136
  //
135

  
137 136
  // Try to force the printer resolution to 300dpi
138 137
  // to get past platform specific defaults in printer
139 138
  // resolution...
......
410 409
      if ( mypVectorLayer )
411 410
      {
412 411
        QString myLayerName = mypVectorLayer->name();
413
        int myLayerNameWidth = myLegendFontMetrics.width(myLayerName);
414 412
        QIcon myIcon;
415 413
        QPixmap myPixmap ( QSize ( myIconWidth, myIconWidth ) ); //square
416 414
        //based on code from qgslegendlayer.cpp - see that file for more info
......
445 443
          }
446 444
          myLegendXPos += myIconWidth + myLegendSpacer;
447 445
          myPrintPainter.setPen( Qt::black );
448
          int myMaximumLabelWidth = myLegendDimensionX - myLegendXPos;
449 446
          QStringList myWrappedLayerNameList = wordWrap(myLayerName, 
450 447
              myLegendFontMetrics, 
451 448
              myLegendDimensionX - myIconWidth);
......
547 544
            }
548 545
            myLabel = myLabel.trimmed();
549 546
            myLegendXPos += myIconWidth + myLegendSpacer;
550
            int myLabelWidth = myLegendFontMetrics.width(myLabel);
551 547
            myPrintPainter.setPen( Qt::black );
552
            //
553 548

  
554 549
            QStringList myWrappedLayerNameList = wordWrap(myLabel, 
555 550
                myLegendFontMetrics, 
qgis/src/gui/qgsdetaileditemdelegate.h (working copy)
30 30
class GUI_EXPORT QgsDetailedItemDelegate : 
31 31
     public QAbstractItemDelegate 
32 32
{
33
  Q_OBJECT;
33
  Q_OBJECT
34 34
  public:
35 35
    QgsDetailedItemDelegate(QObject * parent = 0);
36 36
    ~QgsDetailedItemDelegate();
qgis/src/gui/qgsmapoverviewcanvas.h (working copy)
34 34

  
35 35
class GUI_EXPORT QgsMapOverviewCanvas : public QWidget
36 36
{
37
  Q_OBJECT;
37
  Q_OBJECT
38 38
  
39 39
  public:
40 40
    QgsMapOverviewCanvas(QWidget * parent = 0, QgsMapCanvas* mapCanvas = NULL);
qgis/src/gui/qgsdetaileditemdelegate.cpp (working copy)
54 54
  {
55 55
    QgsDetailedItemData myData = 
56 56
      qVariantValue<QgsDetailedItemData>(theIndex.data(Qt::UserRole));
57
    bool myCheckState = theIndex.model()->data(theIndex, Qt::CheckStateRole).toBool();
58 57
    if (myData.isRenderedAsWidget())
59 58
    {
60 59
      paintAsWidget(thepPainter,theOption,myData);
qgis/src/gui/qgsquickprint.h (working copy)
36 36
*/
37 37
class GUI_EXPORT QgsQuickPrint:public QObject
38 38
{
39
  Q_OBJECT;
39
  Q_OBJECT
40 40
  public:
41 41
      
42 42
  QgsQuickPrint();
qgis/src/gui/qgsdetaileditemwidget.h (working copy)
24 24
class QgsDetailedItemWidget : 
25 25
     public QWidget, private Ui::QgsDetailedItemWidgetBase
26 26
{
27
  Q_OBJECT;
27
  Q_OBJECT
28 28
  public:
29 29
    QgsDetailedItemWidget(QWidget * parent = 0);
30 30
    ~QgsDetailedItemWidget();
qgis/src/gui/qgsmapcanvas.h (working copy)
91 91

  
92 92
class GUI_EXPORT QgsMapCanvas : public QGraphicsView
93 93
{
94
    Q_OBJECT;
94
    Q_OBJECT
95 95

  
96 96
  public:
97 97
    
qgis/src/gui/qgisinterface.h (working copy)
48 48

  
49 49
class GUI_EXPORT QgisInterface : public QObject
50 50
{
51
  Q_OBJECT;
51
  Q_OBJECT
52 52

  
53 53
  public:
54 54

  
qgis/src/gui/qgsgenericprojectionselector.h (working copy)
30 30

  
31 31
class GUI_EXPORT QgsGenericProjectionSelector : public QDialog, private Ui::QgsGenericProjectionSelectorBase
32 32
{
33
  Q_OBJECT;
33
  Q_OBJECT
34 34
  public:
35 35
    /**
36 36
     * Constructor
qgis/src/core/qgsfeature.cpp (working copy)
36 36
QgsFeature::QgsFeature( QgsFeature const & rhs )
37 37
    : mFid( rhs.mFid ),
38 38
      mAttributes( rhs.mAttributes ),
39
      mGeometry( 0 ),
40
      mOwnsGeometry( false ),
39 41
      mValid( rhs.mValid ),
40 42
      mDirty( rhs.mDirty ),
41
      mTypeName( rhs.mTypeName ),
42
      mGeometry( 0 ),
43
      mOwnsGeometry( false )
43
      mTypeName( rhs.mTypeName )
44 44
{
45 45

  
46 46
  // copy embedded geometry
qgis/src/core/qgsvectorlayer.cpp (working copy)
95 95
  mProviderKey(providerKey),
96 96
  mEditable(false),
97 97
  mModified(false),
98
  mMaxUpdatedIndex(-1),
98 99
  mRenderer(0),
99 100
  mLabel(0),
100 101
  mLabelOn(false),
101
  mMaxUpdatedIndex(-1),
102 102
  mFetching(false)
103 103
{
104 104
  mActions = new QgsAttributeAction;
......
703 703
    /* Scale factor of the marker image*/
704 704
    /* We set this to the symbolScale, and if it is NOT changed, */
705 705
    /* we don't have to do another scaling here */
706
    double markerScaleFactor = renderContext.rasterScaleFactor();
706
    // XXX - mloskot: unused
707
    // double markerScaleFactor = renderContext.rasterScaleFactor();
707 708

  
708 709
    if(mEditable)
709 710
    {
......
738 739
          emit drawingProgress(featureCount, totalFeatures);
739 740
          qApp->processEvents();
740 741
        }
742
#else
743
        UNREFERENCED_PARAMETER(totalFeatures);
741 744
#endif //Q_WS_MAC
742 745

  
743 746
        if (mEditable)
......
1645 1648

  
1646 1649
int QgsVectorLayer::splitFeatures(const QList<QgsPoint>& splitLine, bool topologicalEditing)
1647 1650
{
1648
  QgsGeometry* newGeometry = 0;
1649 1651
  QgsFeatureList newFeatures; //store all the newly created features
1650 1652
  double xMin, yMin, xMax, yMax;
1651 1653
  QgsRect bBox; //bounding box of the split line
......
1870 1872
        }
1871 1873
        break;
1872 1874
      }
1875
    default:
1876
      break;
1873 1877
  }
1874 1878
  return returnVal;
1875 1879
}
qgis/src/core/qgsvectorfilewriter.cpp (working copy)
30 30
#include <QTextCodec>
31 31

  
32 32
#include <cassert>
33
#include <cstdlib> // size_t
33 34

  
34 35
#include <ogr_api.h>
35 36
#include <ogr_srs_api.h>
......
340 341
  bool ok = TRUE;
341 342

  
342 343
  const char* suffixes[] = { ".shp", ".shx", ".dbf", ".prj", ".qix" };
343
  for (int i = 0; i < sizeof(suffixes) / sizeof(char*); i++)
344
  for (std::size_t i = 0; i < sizeof(suffixes) / sizeof(char*); i++)
344 345
  {
345 346
    QString file = myFileBase + suffixes[i];
346 347
    QFileInfo myInfo(file);
qgis/src/core/raster/qgsrasterlayer.cpp (working copy)
305 305
    QString const & baseName, 
306 306
    bool loadDefaultStyleFlag)
307 307
  : QgsMapLayer(RASTER, baseName, path),
308
  // Constant that signals property not used.
309
  QSTRING_NOT_SET("Not Set"),
310
  TRSTRING_NOT_SET(tr("Not Set")),
308 311
  mRasterXDim( std::numeric_limits<int>::max() ),
309 312
  mRasterYDim( std::numeric_limits<int>::max() ),
310 313
  mDebugOverlayFlag(false),
311 314
  mInvertPixelsFlag(false),
312 315
  mStandardDeviations(0),
313
  mDataProvider(0),
314
  // Constant that signals property not used.
315
  QSTRING_NOT_SET("Not Set"),
316
  TRSTRING_NOT_SET(tr("Not Set"))
317

  
316
  mDataProvider(0)
318 317
{
319 318

  
320 319
  mUserDefinedRGBMinMaxFlag = false; //defaults needed to bypass stretch
......
2420 2419
  // a certain range -- in this case twenty times the smallest value that
2421 2420
  // doubles can take for the current system.  (Yes, 20 was arbitrary.)
2422 2421
  double myPrecision = std::numeric_limits<double>::epsilon() * 20;
2422
  UNREFERENCED_PARAMETER(myPrecision);
2423 2423
  
2424 2424
  //ifdefs below to remove compiler warning about unused vars
2425 2425
#ifdef QGISDEBUG
......
5155 5155
    case USER_DEFINED:
5156 5156
      return QString("USER_DEFINED");
5157 5157
      break;
5158
    default:
5159
      break;
5158 5160
  }
5159 5161
  
5160 5162
  return QString("UNDEFINED_SHADING_ALGORITHM");
qgis/src/core/raster/qgscontrastenhancement.cpp (working copy)
102 102
    case QGS_CFloat64:
103 103
    return std::numeric_limits<double>::max();
104 104
      break;
105
    default:
106
      // XXX - mloskot: QGS_Unknown and QGS_TypeCount not handled?
107
      break;
105 108
  }
106 109

  
107 110
  return std::numeric_limits<double>::max();
......
146 149
    case QGS_CFloat64:
147 150
    return std::numeric_limits<double>::max() * -1.0;
148 151
      break;
152
    default:
153
      // XXX - mloskot: QGS_Unknown and QGS_TypeCount not handled?
154
      break;
149 155
  }
150 156

  
151 157
  return std::numeric_limits<double>::max() * -1.0;
qgis/src/core/qgsgeometry.cpp (working copy)
1109 1109
  for (unsigned int i=0, j=0; i<numPoints; i++, j++)
1110 1110
  {
1111 1111
    // Do we insert the new vertex here?
1112
    if (beforeVertex == i)
1112
    if (beforeVertex == static_cast<int>(i))
1113 1113
    {
1114 1114
      GEOSCoordSeq_setX(*new_sequence, j, x);
1115 1115
      GEOSCoordSeq_setY(*new_sequence, j, y);
......
4608 4608
  //ratio intersect geometry / geometry. This should be close to 1
4609 4609
  //if the polygon belongs to the input geometry
4610 4610

  
4611
  double areaRatio = 0.0;
4612 4611
  for(int i=0; i<GEOSGetNumGeometries(polygons); i++)
4613 4612
  {
4614 4613
    const GEOSGeometry *polygon = GEOSGetGeometryN(polygons, i);
......
4620 4619
    double polygonArea;
4621 4620
    GEOSArea(polygon, &polygonArea);
4622 4621

  
4623
    double areaRatio = intersectionArea / polygonArea;
4622
    const double areaRatio = intersectionArea / polygonArea;
4624 4623
    if(areaRatio > 0.99 && areaRatio < 1.01)
4625 4624
      testedGeometries << GEOSGeom_clone(polygon);
4626 4625

  
qgis/src/core/qgsmaprenderer.cpp (working copy)
499 499
      QgsCoordinateTransform tr(layer->srs(), *mDestCRS);
500 500
      
501 501
#ifdef QGISDEBUG
502
     // QgsLogger::debug<QgsRect>("Getting extent of canvas in layers CS. Canvas is ", extent, __FILE__,\
503
     //   __FUNCTION__, __LINE__);
502
     // QgsLogger::debug<QgsRect>("Getting extent of canvas in layers CS. Canvas is ", extent, __FILE__, __FUNCTION__, __LINE__);
504 503
#endif
505 504
      // Split the extent into two if the source CRS is
506 505
      // geographic and the extent crosses the split in
qgis/src/core/qgsvectorlayer.h (working copy)
65 65
    UniqueValuesEditable,
66 66
    ValueMap,
67 67
    Classification,
68
    Range,
68
    Range
69 69
  };
70 70

  
71 71
  struct RangeData {
qgis/src/core/qgsprojectfiletransform.h (working copy)
66 66
    void (QgsProjectFileTransform::* transformFunc)();
67 67
  } transform;
68 68

  
69
  static transform transformers[];;
69
  static transform transformers[];
70 70

  
71 71
  QDomDocument mDom;
72 72
  QgsProjectVersion mCurrentVersion;
qgis/src/core/qgsprojectversion.cpp (working copy)
51 51
  return ((mMajor == other.mMajor) &&
52 52
          (mMinor == other.mMinor) &&
53 53
          (mSub == other.mSub));
54
};
54
}
55 55

  
56 56
/*! Boolean >= operator
57 57
 */
......
60 60
  return ( (mMajor >= other.mMajor) ||
61 61
          ((mMajor == other.mMajor) && (mMinor >= other.mMinor)) ||
62 62
          ((mMajor == other.mMajor) && (mMinor == other.mMinor) && (mSub >= other.mSub)));
63
};
63
}
64 64

  
65 65
/*! Boolean > operator
66 66
 */
......
69 69
  return ( (mMajor > other.mMajor) ||
70 70
           ((mMajor == other.mMajor) && (mMinor > other.mMinor)) ||
71 71
           ((mMajor == other.mMajor) && (mMinor == other.mMinor) && (mSub > other.mSub)));
72
}; 
72
} 
73 73

  
74 74
QString QgsProjectVersion::text()
75 75
{
qgis/src/core/spatialindex/tools/Tools.cc (working copy)
20 20
//    [email protected]
21 21

  
22 22
#include <cstring>
23
#include <sstream>
23 24
#include <limits>
24 25
#include <cfloat>
25 26
#include <Tools.h>
......
118 119
	m_propertySet.clear();
119 120

  
120 121
	unsigned long numberOfProperties;
121
	memcpy(&numberOfProperties, ptr, sizeof(unsigned long));
122
	std::memcpy(&numberOfProperties, ptr, sizeof(unsigned long));
122 123
	ptr += sizeof(unsigned long);
123 124

  
124 125
	Variant v;
......
127 128
	{
128 129
		std::string s(reinterpret_cast<const char*>(ptr));
129 130
		ptr += s.size() + 1;
130
		memcpy(&(v.m_varType), ptr, sizeof(VariantType));
131
		std::memcpy(&(v.m_varType), ptr, sizeof(VariantType));
131 132
		ptr += sizeof(VariantType);
132 133

  
133 134
		switch (v.m_varType)
134 135
		{
135 136
		case VT_LONG:
136 137
			long l;
137
			memcpy(&l, ptr, sizeof(long));
138
			std::memcpy(&l, ptr, sizeof(long));
138 139
			ptr += sizeof(long);
139 140
			v.m_val.lVal = l;
140 141
			break;
141 142
		case VT_LONGLONG:
142 143
			long long ll;
143
			memcpy(&ll, ptr, sizeof(long long));
144
			std::memcpy(&ll, ptr, sizeof(long long));
144 145
			ptr += sizeof(long long);
145 146
			v.m_val.llVal = ll;
146 147
			break;
147 148
		case VT_BYTE:
148 149
			byte b;
149
			memcpy(&b, ptr, sizeof(byte));
150
			std::memcpy(&b, ptr, sizeof(byte));
150 151
			ptr += sizeof(byte);
151 152
			v.m_val.bVal = b;
152 153
			break;
153 154
		case VT_SHORT:
154 155
			short s;
155
			memcpy(&s, ptr, sizeof(short));
156
			std::memcpy(&s, ptr, sizeof(short));
156 157
			ptr += sizeof(short);
157 158
			v.m_val.iVal = s;
158 159
			break;
159 160
		case VT_FLOAT:
160 161
			float f;
161
			memcpy(&f, ptr, sizeof(float));
162
			std::memcpy(&f, ptr, sizeof(float));
162 163
			ptr += sizeof(float);
163 164
			v.m_val.fltVal = f;
164 165
			break;
165 166
		case VT_DOUBLE:
166 167
			double d;
167
			memcpy(&d, ptr, sizeof(double));
168
			std::memcpy(&d, ptr, sizeof(double));
168 169
			ptr += sizeof(double);
169 170
			v.m_val.dblVal = d;
170 171
			break;
171 172
		case VT_CHAR:
172 173
			char c;
173
			memcpy(&c, ptr, sizeof(char));
174
			std::memcpy(&c, ptr, sizeof(char));
174 175
			ptr += sizeof(char);
175 176
			v.m_val.cVal = c;
176 177
			break;
177 178
		case VT_USHORT:
178 179
			unsigned short us;
179
			memcpy(&us, ptr, sizeof(unsigned short));
180
			std::memcpy(&us, ptr, sizeof(unsigned short));
180 181
			ptr += sizeof(unsigned short);
181 182
			v.m_val.uiVal = us;
182 183
			break;
183 184
		case VT_ULONG:
184 185
			unsigned long ul;
185
			memcpy(&ul, ptr, sizeof(unsigned long));
186
			std::memcpy(&ul, ptr, sizeof(unsigned long));
186 187
			ptr += sizeof(unsigned long);
187 188
			v.m_val.ulVal = ul;
188 189
			break;
189 190
		case VT_ULONGLONG:
190 191
			unsigned long long ull;
191
			memcpy(&ull, ptr, sizeof(unsigned long long));
192
			std::memcpy(&ull, ptr, sizeof(unsigned long long));
192 193
			ptr += sizeof(unsigned long long);
193 194
			v.m_val.ullVal = ull;
194 195
			break;
195 196
		case VT_INT:
196 197
			int i;
197
			memcpy(&i, ptr, sizeof(int));
198
			std::memcpy(&i, ptr, sizeof(int));
198 199
			ptr += sizeof(int);
199 200
			v.m_val.intVal = i;
200 201
			break;
201 202
		case VT_UINT:
202 203
			unsigned int ui;
203
			memcpy(&ui, ptr, sizeof(unsigned int));
204
			std::memcpy(&ui, ptr, sizeof(unsigned int));
204 205
			ptr += sizeof(unsigned int);
205 206
			v.m_val.uintVal = ui;
206 207
			break;
207 208
		case VT_BOOL:
208 209
			byte bl;
209
			memcpy(&bl, ptr, sizeof(byte));
210
			std::memcpy(&bl, ptr, sizeof(byte));
210 211
			ptr += sizeof(byte);
211 212
			v.m_val.blVal = bl!=0;
212 213
			break;
......
286 287
	byte* ptr = *data;
287 288

  
288 289
	unsigned long numberOfProperties = m_propertySet.size();
289
	memcpy(ptr, &numberOfProperties, sizeof(unsigned long));
290
	std::memcpy(ptr, &numberOfProperties, sizeof(unsigned long));
290 291
	ptr += sizeof(unsigned long);
291 292

  
292 293
	std::map<std::string, Variant>::iterator it;
......
294 295
	for (it = m_propertySet.begin(); it != m_propertySet.end(); it++)
295 296
	{
296 297
		unsigned long strSize = (*it).first.size();
297
		memcpy(ptr, (*it).first.c_str(), strSize);
298
		std::memcpy(ptr, (*it).first.c_str(), strSize);
298 299
		ptr += strSize;
299 300
		*ptr = 0;
300 301
		ptr++;
301 302

  
302
		memcpy(ptr, &((*it).second.m_varType), sizeof(VariantType));
303
		std::memcpy(ptr, &((*it).second.m_varType), sizeof(VariantType));
303 304
		ptr += sizeof(VariantType);
304 305

  
305 306
		switch ((*it).second.m_varType)
306 307
		{
307 308
		case VT_LONG:
308
			memcpy(ptr, &((*it).second.m_val.lVal), sizeof(long));
309
			std::memcpy(ptr, &((*it).second.m_val.lVal), sizeof(long));
309 310
			ptr += sizeof(long);
310 311
			break;
311 312
		case VT_LONGLONG:
312
			memcpy(ptr, &((*it).second.m_val.llVal), sizeof(long long));
313
			std::memcpy(ptr, &((*it).second.m_val.llVal), sizeof(long long));
313 314
			ptr += sizeof(long long);
314 315
			break;
315 316
		case VT_BYTE:
316
			memcpy(ptr, &((*it).second.m_val.bVal), sizeof(byte));
317
			std::memcpy(ptr, &((*it).second.m_val.bVal), sizeof(byte));
317 318
			ptr += sizeof(byte);
318 319
			break;
319 320
		case VT_SHORT:
320
			memcpy(ptr, &((*it).second.m_val.iVal), sizeof(short));
321
			std::memcpy(ptr, &((*it).second.m_val.iVal), sizeof(short));
321 322
			ptr += sizeof(short);
322 323
			break;
323 324
		case VT_FLOAT:
324
			memcpy(ptr, &((*it).second.m_val.fltVal), sizeof(float));
325
			std::memcpy(ptr, &((*it).second.m_val.fltVal), sizeof(float));
325 326
			ptr += sizeof(float);
326 327
			break;
327 328
		case VT_DOUBLE:
328
			memcpy(ptr, &((*it).second.m_val.dblVal), sizeof(double));
329
			std::memcpy(ptr, &((*it).second.m_val.dblVal), sizeof(double));
329 330
			ptr += sizeof(double);
330 331
			break;
331 332
		case VT_CHAR:
332
			memcpy(ptr, &((*it).second.m_val.cVal), sizeof(char));
333
			std::memcpy(ptr, &((*it).second.m_val.cVal), sizeof(char));
333 334
			ptr += sizeof(char);
334 335
			break;
335 336
		case VT_USHORT:
336
			memcpy(ptr, &((*it).second.m_val.uiVal), sizeof(unsigned short));
337
			std::memcpy(ptr, &((*it).second.m_val.uiVal), sizeof(unsigned short));
337 338
			ptr += sizeof(unsigned short);
338 339
			break;
339 340
		case VT_ULONG:
340
			memcpy(ptr, &((*it).second.m_val.ulVal), sizeof(unsigned long));
341
			std::memcpy(ptr, &((*it).second.m_val.ulVal), sizeof(unsigned long));
341 342
			ptr += sizeof(unsigned long);
342 343
			break;
343 344
		case VT_ULONGLONG:
344
			memcpy(ptr, &((*it).second.m_val.ullVal), sizeof(unsigned long long));
345
			std::memcpy(ptr, &((*it).second.m_val.ullVal), sizeof(unsigned long long));
345 346
			ptr += sizeof(unsigned long long);
346 347
			break;
347 348
		case VT_INT:
348
			memcpy(ptr, &((*it).second.m_val.intVal), sizeof(int));
349
			std::memcpy(ptr, &((*it).second.m_val.intVal), sizeof(int));
349 350
			ptr += sizeof(int);
350 351
			break;
351 352
		case VT_UINT:
352
			memcpy(ptr, &((*it).second.m_val.uintVal), sizeof(unsigned int));
353
			std::memcpy(ptr, &((*it).second.m_val.uintVal), sizeof(unsigned int));
353 354
			ptr += sizeof(unsigned int);
354 355
			break;
355 356
		case VT_BOOL:
356 357
			byte bl;
357 358
			bl = (*it).second.m_val.blVal;
358
			memcpy(ptr, &bl, sizeof(byte));
359
			std::memcpy(ptr, &bl, sizeof(byte));
359 360
			ptr += sizeof(byte);
360 361
			break;
361 362
		default:
......
582 583
	if (lin == 0) { *out = 0; lout = 0;	return; }
583 584

  
584 585
	byte *data = 0, *pdata = 0, *pin;
585
#ifdef _MSC_VER
586
	// MSVC doesn't like non-const array initialisers
586
   
587
    // NOTE- mloskot:
588
    // VLA was used to use here but removed.
589
    // ISO C++ does not defined Variable-Length Arrays and C99 features are
590
    // not part of ISO C++. So, using VLA in C++ source file and compiling
591
    // with C++ compiler is not portable.
592
    // For RAII, std::vector should be used instead of dynamic arrays.
587 593
	byte* cv = new byte[blockSize];
588 594
	byte* pv = new byte[blockSize];
589
#else
590
	byte cv[blockSize], pv[blockSize];
591
#endif//_MSC_VER
592 595
	byte rl;
593 596
	unsigned long bufferLength = 2 * lin;
594 597

  
595 598
	pin = in;
596
	memcpy(cv, pin, blockSize);
599
	std::memcpy(cv, pin, blockSize);
597 600
	pv[0] = ~cv[0]; // force next character to be different.
598 601
	assert(pv[0] != cv[0]);
599 602
	data = new byte[bufferLength];
......
601 604

  
602 605
	while (pin < in + lin)
603 606
	{
604
		memcpy(cv, pin, blockSize);
607
		std::memcpy(cv, pin, blockSize);
605 608
		pin += blockSize;
606 609

  
607 610
		assert(pin <= in + lin);
......
619 622
			catch(...)
620 623
			{
621 624
				delete[] data;
622
#ifdef _MSC_VER
623 625
				delete[] cv;
624 626
				delete[] pv;
625
#endif//_MSC_VER
626 627
				throw;
627 628
			}
628 629

  
629
			memcpy(tmp, data, bufferLength);
630
			std::memcpy(tmp, data, bufferLength);
630 631
			pdata = tmp + (pdata - data);
631 632
			byte* tmp2 = data;
632 633
			data = tmp;
......
634 635
			bufferLength *= 2;
635 636
		}
636 637

  
637
		memcpy(pdata, cv, blockSize);
638
		std::memcpy(pdata, cv, blockSize);
638 639
		pdata += blockSize;
639 640

  
640 641
		if (memcmp(cv, pv, blockSize) == 0 && pin < in + lin)
641 642
		{
642
			memcpy(&rl, pin, sizeof(byte));
643
			std::memcpy(&rl, pin, sizeof(byte));
643 644
			pin += sizeof(byte);
644 645
			assert(pin <= in + lin);
645 646
			if (
......
657 658
				catch(...)
658 659
				{
659 660
					delete[] data;
660
#ifdef _MSC_VER
661 661
					delete[] cv;
662 662
					delete[] pv;
663
#endif//_MSC_VER
664 663
					throw;
665 664
				}
666 665

  
667
				memcpy(tmp, data, bufferLength);
666
				std::memcpy(tmp, data, bufferLength);
668 667
				pdata = tmp + (pdata - data);
669 668
				byte* tmp2 = data;
670 669
				data = tmp;
......
674 673

  
675 674
			while (rl > 0)
676 675
			{
677
				memcpy(pdata, cv, blockSize);
676
				std::memcpy(pdata, cv, blockSize);
678 677
				pdata += blockSize;
679 678
				rl--;
680 679
			}
681
			memcpy(cv, pin, blockSize);
680
			std::memcpy(cv, pin, blockSize);
682 681
			pv[0] = ~cv[0];
683 682
			assert(pv[0] != cv[0]);
684 683
		}
685
		else memcpy(pv, cv, blockSize);
684
		else std::memcpy(pv, cv, blockSize);
686 685
	}
687 686

  
688 687
	lout = pdata - data;
......
694 693
	catch(...)
695 694
	{
696 695
		delete[] data;
697
#ifdef _MSC_VER
698 696
		delete[] cv;
699 697
		delete[] pv;
700
#endif//_MSC_VER
701 698
		throw;
702 699
	}
703 700

  
704
	memcpy(*out, data, lout);
701
	std::memcpy(*out, data, lout);
705 702
	delete[] data;
706
#ifdef _MSC_VER
707 703
	delete[] cv;
708 704
	delete[] pv;
709
#endif//_MSC_VER
710 705
}
711 706

  
712 707
#if HAVE_GETTIMEOFDAY
qgis/src/core/spatialindex/geometry/LineSegment.cc (working copy)
172 172

  
173 173
void Tools::Geometry::LineSegment::getCenter(Point& out) const
174 174
{
175
#ifdef _MSC_VER
176
	// MSVC doesn't like non-const array initialisers
177 175
	double* coords = new double[m_dimension];
178
#else
179
	double coords[m_dimension];
180
#endif//_MSC_VER
181 176

  
182 177
	for (unsigned long cDim = 0; cDim < m_dimension; cDim++)
183 178
	{
......
188 183

  
189 184
	out = Point(coords, m_dimension);
190 185

  
191
#ifdef _MSC_VER
192 186
	delete[] coords;
193
#endif//_MSC_VER
194 187
}
195 188

  
196 189
unsigned long Tools::Geometry::LineSegment::getDimension() const
......
200 193

  
201 194
void Tools::Geometry::LineSegment::getMBR(Region& out) const
202 195
{
203
#ifdef _MSC_VER
204
	// MSVC doesn't like non-const array initialisers
205 196
	double* low = new double[m_dimension];
206 197
	double* high = new double[m_dimension];
207
#else
208
	double low[m_dimension];
209
	double high[m_dimension];
210
#endif//_MSC_VER
211 198

  
212 199
	for (unsigned long cDim = 0; cDim < m_dimension; cDim++)
213 200
	{
......
217 204

  
218 205
	out = Region(low, high, m_dimension);
219 206

  
220
#ifdef _MSC_VER
221 207
	delete[] low;
222 208
	delete[] high;
223
#endif//_MSC_VER
224 209
}
225 210

  
226 211
double Tools::Geometry::LineSegment::getArea() const
qgis/src/core/qgis.h (working copy)
146 146
#endif
147 147
#endif
148 148

  
149
#ifndef UNREFERENCED_PARAMETER
150
#  define UNREFERENCED_PARAMETER(param) ((void)param)
149 151
#endif
152

  
153
#endif
qgis/src/core/qgsprojectfiletransform.cpp (working copy)
23 23
#include <QTextStream>
24 24
#include <QDomDocument>
25 25
#include <QPrinter> //to find out screen resolution
26
#include <cstdlib>
26 27

  
27 28
typedef QgsProjectVersion PFV;
28 29

  
......
42 43

  
43 44
  if ( ! mDom.isNull() )
44 45
  {
45
    for (int i = 0; i < sizeof(transformers)/sizeof(transform); i++)
46
    for (std::size_t i = 0; i < sizeof(transformers)/sizeof(transform); i++)
46 47
    {
47 48
      if ( transformers[i].from == mCurrentVersion)
48 49
      {
......
54 55
    }
55 56
  }
56 57
  return returnValue;
57
};
58
}
58 59

  
59 60
void QgsProjectFileTransform::dump()
60 61
{
......
176 177
  }
177 178
  return;
178 179

  
179
};
180
}
180 181

  
181 182
void QgsProjectFileTransform::transform091to0100()
182 183
{
......
235 236
  }
236 237
  return;
237 238

  
238
};
239
}
239 240

  
240 241
void QgsProjectFileTransform::transform0100to0110()
241 242
{
qgis/src/core/symbology/qgsmarkercatalogue.cpp (working copy)
264 264
    }
265 265
  else if (name == "star")
266 266
    {
267
      int oneThird = 2*r/3;
268
      int twoThird = 4*r/3;
269 267
      int oneSixth = 2*r/6;
270 268

  
271 269
      QPolygon pa(10);
qgis/src/providers/delimitedtext/qgsdelimitedtextprovider.h (working copy)
42 42
*/
43 43
class QgsDelimitedTextProvider : public QgsVectorDataProvider
44 44
{
45
  Q_OBJECT;
45
  Q_OBJECT
46 46

  
47 47
public:
48 48

  
qgis/src/providers/postgres/qgspostgresprovider.h (working copy)
49 49
  */
50 50
class QgsPostgresProvider : public QgsVectorDataProvider
51 51
{
52
  Q_OBJECT;
52
  Q_OBJECT
53 53

  
54 54
  public:
55 55
    /**
qgis/src/providers/postgres/qgspostgresprovider.cpp (working copy)
55 55

  
56 56
QgsPostgresProvider::QgsPostgresProvider(QString const & uri)
57 57
: QgsVectorDataProvider(uri),
58
  mFetching(false),
58 59
  geomType(QGis::WKBUnknown),
59 60
  mFeatureQueueSize(200),
60
  gotPostgisVersion(false),
61
  mFetching(false)
61
  gotPostgisVersion(false)
62 62
{
63 63
  // assume this is a valid layer until we determine otherwise
64 64
  valid = true;
qgis/src/providers/ogr/qgsogrprovider.cpp (working copy)
471 471
  bool returnValue = true;
472 472
  OGRFeatureDefnH fdef=OGR_L_GetLayerDefn(ogrLayer);
473 473
  OGRFeatureH feature= OGR_F_Create(fdef);
474
  QGis::WKBTYPE ftype = f.geometry()->wkbType();
475 474
  unsigned char* wkb = f.geometry()->wkbBuffer();
476 475

  
477 476
  if( f.geometry()->wkbSize() > 0 )
......
1263 1262

  
1264 1263
  uniqueValues.clear();
1265 1264

  
1266
  OGRLayerH l = OGR_DS_ExecuteSQL(ogrDataSource, sql.toAscii(), NULL, "SQL");
1267
  if(l==0)
1265
  OGRLayerH lyr = OGR_DS_ExecuteSQL(ogrDataSource, sql.toAscii(), NULL, "SQL");
1266
  if( 0 == lyr )
1268 1267
    return;
1269 1268

  
1270 1269
  OGRFeatureH f;
1271
  while( f=OGR_L_GetNextFeature(l) )
1270
  while( 0 != (f = OGR_L_GetNextFeature(lyr)) )
1272 1271
  {
1273 1272
    uniqueValues.append( mEncoding->toUnicode(OGR_F_GetFieldAsString(f, 0)) );
1274 1273
    OGR_F_Destroy(f);
1275 1274
  }
1276 1275

  
1277
  OGR_DS_ReleaseResultSet(ogrDataSource, l);
1276
  OGR_DS_ReleaseResultSet(ogrDataSource, lyr);
1278 1277
}
1279 1278

  
1280 1279

  
qgis/src/providers/memory/memoryprovider.cpp (working copy)
28 28

  
29 29
QgsMemoryProvider::QgsMemoryProvider(QString uri)
30 30
  : QgsVectorDataProvider(uri),
31
    mSpatialIndex(NULL),
32
    mSelectRectGeom(NULL)
31
    mSelectRectGeom(NULL),
32
    mSpatialIndex(NULL)
33 33
{
34 34
  if (uri == "Point")
35 35
    mWkbType = QGis::WKBPoint;