Skip to content

Commit c29fb5a

Browse files
committed
fix gcc 4.7 warnings/errors
1 parent 34f10f1 commit c29fb5a

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

src/app/main.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ typedef SInt32 SRefCon;
7575
#include "qgslogger.h"
7676

7777
#if defined(linux) && ! defined(ANDROID)
78+
#include <unistd.h>
7879
#include <execinfo.h>
7980
#endif
8081

src/core/symbology-ng/qgssymbollayerv2registry.h

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ class CORE_EXPORT QgsSymbolLayerV2AbstractMetadata
1919
QgsSymbolLayerV2AbstractMetadata( QString name, QString visibleName, QgsSymbolV2::SymbolType type )
2020
: mName( name ), mVisibleName( visibleName ), mType( type ) {}
2121

22+
virtual ~QgsSymbolLayerV2AbstractMetadata() {}
23+
2224
QString name() const { return mName; }
2325
QString visibleName() const { return mVisibleName; }
2426
QgsSymbolV2::SymbolType type() const { return mType; }

src/plugins/georeferencer/qgsleastsquares.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ void QgsLeastSquares::helmert( std::vector<QgsPoint> mapCoords,
9494
that this is correct but I derived it myself late at night. Look at
9595
helmert.jpg if you suspect bugs. */
9696

97-
double MData[] = { A, -B, n, 0,
98-
B, A, 0, n,
99-
G + H, 0, A, B,
100-
0, G + H, -B, A
97+
double MData[] = { A, -B, ( double ) n, 0.,
98+
B, A, 0., ( double ) n,
99+
G + H, 0., A, B,
100+
0., G + H, -B, A
101101
};
102102

103103
double bData[] = { C, D, E + F, J - I };
@@ -151,8 +151,8 @@ void QgsLeastSquares::affine( std::vector<QgsPoint> mapCoords,
151151
I *think* that this is correct but I derived it myself late at night.
152152
Look at affine.jpg if you suspect bugs. */
153153

154-
double MData[] = { A, B, 0, 0, n, 0,
155-
0, 0, A, B, 0, n,
154+
double MData[] = { A, B, 0, 0, ( double ) n, 0,
155+
0, 0, A, B, 0, ( double ) n,
156156
E, G, 0, 0, A, 0,
157157
G, F, 0, 0, B, 0,
158158
0, 0, E, G, 0, A,

0 commit comments

Comments
 (0)