Commit 3e937e05 authored by Lorenz Meier's avatar Lorenz Meier

Merge pull request #513 from DonLakeFlyer/ThirdPartyWarnings

Third party warnings
parents de3aaa03 a94d575e
...@@ -186,10 +186,13 @@ WindowsBuild { ...@@ -186,10 +186,13 @@ WindowsBuild {
ReleaseBuild { ReleaseBuild {
QMAKE_POST_LINK += $$escape_expand(\\n) $$quote(del /F "$$DESTDIR_WIN\\$${TARGET}.exp") QMAKE_POST_LINK += $$escape_expand(\\n) $$quote(del /F "$$DESTDIR_WIN\\$${TARGET}.exp")
# This next xcopy does not always work because the files are not there by default, so disabling for now while
# we figure out the right way to do it
# Copy Visual Studio DLLs # Copy Visual Studio DLLs
# Note that this is only done for release because the debugging versions of these DLLs cannot be redistributed. # Note that this is only done for release because the debugging versions of these DLLs cannot be redistributed.
# I'm not certain of the path for VS2008, so this only works for VS2010. # I'm not certain of the path for VS2008, so this only works for VS2010.
win32-msvc2010 { win32-msvc2010_NotWorkingButKeepingIn {
QMAKE_POST_LINK += $$escape_expand(\\n) $$quote(xcopy /D /Y "\"C:\\Program Files \(x86\)\\Microsoft Visual Studio 10.0\\VC\\redist\\x86\\Microsoft.VC100.CRT\\*.dll\"" "$$DESTDIR_WIN\\") QMAKE_POST_LINK += $$escape_expand(\\n) $$quote(xcopy /D /Y "\"C:\\Program Files \(x86\)\\Microsoft Visual Studio 10.0\\VC\\redist\\x86\\Microsoft.VC100.CRT\\*.dll\"" "$$DESTDIR_WIN\\")
} }
} }
......
...@@ -28,6 +28,11 @@ ...@@ -28,6 +28,11 @@
#include <qmath.h> #include <qmath.h>
// These pragmas are local modifications to this third party library to silence warnings
#ifdef Q_OS_LINUX
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#endif
namespace projections { namespace projections {
LKS94Projection::LKS94Projection():MinLatitude (53.33 ), MaxLatitude (56.55 ), MinLongitude (20.22 ), LKS94Projection::LKS94Projection():MinLatitude (53.33 ), MaxLatitude (56.55 ), MinLongitude (20.22 ),
...@@ -787,3 +792,8 @@ Size LKS94Projection::GetTileMatrixMaxXY(int const& zoom) ...@@ -787,3 +792,8 @@ Size LKS94Projection::GetTileMatrixMaxXY(int const& zoom)
} }
} }
#ifdef Q_OS_LINUX
#pragma GCC diagnostic pop
#endif
...@@ -57,6 +57,16 @@ Point MercatorProjectionYandex::FromLatLngToPixel(double lat, double lng, const ...@@ -57,6 +57,16 @@ Point MercatorProjectionYandex::FromLatLngToPixel(double lat, double lng, const
return ret; return ret;
} }
// These pragmas are local modifications to this third party library to silence warnings
#ifdef Q_OS_LINUX
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#elif defined(Q_OS_MAC)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-variable"
#endif
internals::PointLatLng MercatorProjectionYandex::FromPixelToLatLng(const int &x, const int &y, const int &zoom) internals::PointLatLng MercatorProjectionYandex::FromPixelToLatLng(const int &x, const int &y, const int &zoom)
{ {
Size s = GetTileMatrixSizePixel(zoom); Size s = GetTileMatrixSizePixel(zoom);
...@@ -82,6 +92,11 @@ internals::PointLatLng MercatorProjectionYandex::FromPixelToLatLng(const int &x, ...@@ -82,6 +92,11 @@ internals::PointLatLng MercatorProjectionYandex::FromPixelToLatLng(const int &x,
return ret; return ret;
} }
#ifndef Q_OS_WIN
#pragma GCC diagnostic pop
#endif
double MercatorProjectionYandex::Clip(const double &n, const double &minValue, const double &maxValue) const double MercatorProjectionYandex::Clip(const double &n, const double &minValue, const double &maxValue) const
{ {
return qMin(qMax(n, minValue), maxValue); return qMin(qMax(n, minValue), maxValue);
......
...@@ -533,6 +533,15 @@ QwtRasterData::ContourLines QwtPlotSpectrogram::renderContourLines( ...@@ -533,6 +533,15 @@ QwtRasterData::ContourLines QwtPlotSpectrogram::renderContourLines(
d_data->contourLevels, d_data->conrecAttributes ); d_data->contourLevels, d_data->conrecAttributes );
} }
// These pragmas are local modifications to this third party library to silence warnings
#ifdef Q_OS_LINUX
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#elif defined(Q_OS_MAC)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-variable"
#endif
/*! /*!
Paint the contour lines Paint the contour lines
...@@ -578,6 +587,10 @@ void QwtPlotSpectrogram::drawContourLines(QPainter *painter, ...@@ -578,6 +587,10 @@ void QwtPlotSpectrogram::drawContourLines(QPainter *painter,
} }
} }
#ifndef Q_OS_WIN
#pragma GCC diagnostic pop
#endif
/*! /*!
\brief Draw the spectrogram \brief Draw the spectrogram
......
...@@ -85,8 +85,19 @@ public: ...@@ -85,8 +85,19 @@ public:
public slots: public slots:
void moveBy(double x, double y); void moveBy(double x, double y);
// These pragmas are local modifications to this third party library to silence warnings
#ifndef Q_OS_WIN
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Woverloaded-virtual"
#endif
virtual void move(double x, double y); virtual void move(double x, double y);
#ifndef Q_OS_WIN
#pragma GCC diagnostic pop
#endif
virtual void zoom(const QwtDoubleRect &); virtual void zoom(const QwtDoubleRect &);
virtual void zoom(int up); virtual void zoom(int up);
......
...@@ -55,4 +55,4 @@ unix:!symbian { ...@@ -55,4 +55,4 @@ unix:!symbian {
} }
} }
HEADERS += $$PUBLIC_HEADERS $$PRIVATE_HEADERS HEADERS *= $$PUBLIC_HEADERS $$PRIVATE_HEADERS
...@@ -117,16 +117,23 @@ WindowsBuild { ...@@ -117,16 +117,23 @@ WindowsBuild {
} }
# #
# Warnings cleanup. Plan of attack is to turn on warnings as error once all warnings are fixed. Please # We treat all warnings as errors which must be fixed before proceeding. If you run into a problem you can't fix
# do no change the warning level from what they are currently set to below. # you can always use local pragmas to work around the warning. This should be used sparingly and only in cases where
# the problem absolultey can't be fixed.
# #
MacBuild | LinuxBuild { MacBuild | LinuxBuild {
QMAKE_CXXFLAGS_WARN_ON += -Wall QMAKE_CXXFLAGS_WARN_ON += -Wall
} }
MacBuild {
QMAKE_CXXFLAGS_WARN_ON += -Werror
}
WindowsBuild { WindowsBuild {
QMAKE_CXXFLAGS_WARN_ON += /W3 QMAKE_CXXFLAGS_WARN_ON += /W3 \
/wd4996 \ # silence warnings about deprecated strcpy and whatnot
/wd4290 # ignore exception specifications
} }
# #
......
Subproject commit b8b885c610ee574140c7a6ad9bc007dcf28a74b7 Subproject commit 2db4b382b02c3822acd19e99bc57fa53f3f53d01
...@@ -39,8 +39,20 @@ This file is part of the QGROUNDCONTROL project ...@@ -39,8 +39,20 @@ This file is part of the QGROUNDCONTROL project
#include <osg/PositionAttitudeTransform> #include <osg/PositionAttitudeTransform>
#include <osgGA/TrackballManipulator> #include <osgGA/TrackballManipulator>
#include <osgText/Font> #include <osgText/Font>
// OpenSceneGraph has overloaded virtuals defined, since third party code we silence the warnings when the
// headers are used.
#ifndef Q_OS_WIN
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Woverloaded-virtual"
#endif
#include <osgViewer/Viewer> #include <osgViewer/Viewer>
#ifndef Q_OS_WIN
#pragma GCC diagnostic pop
#endif
#include "CameraParams.h" #include "CameraParams.h"
#include "GCManipulator.h" #include "GCManipulator.h"
#include "SystemGroupNode.h" #include "SystemGroupNode.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment