Browse Source

Merge pull request #513 from DonLakeFlyer/ThirdPartyWarnings

Third party warnings
QGC4.4
Lorenz Meier 11 years ago
parent
commit
3e937e0514
  1. 5
      QGCSetup.pri
  2. 10
      libs/opmapcontrol/src/internals/projections/lks94projection.cpp
  3. 15
      libs/opmapcontrol/src/internals/projections/mercatorprojectionyandex.cpp
  4. 13
      libs/qwt/qwt_plot_spectrogram.cpp
  5. 11
      libs/qwt/qwt_plot_zoomer.h
  6. 2
      libs/serialport/qserialport.pri
  7. 13
      qgroundcontrol.pro
  8. 2
      qupgrade
  9. 12
      src/ui/map3D/Q3DWidget.h

5
QGCSetup.pri

@ -186,10 +186,13 @@ WindowsBuild { @@ -186,10 +186,13 @@ WindowsBuild {
ReleaseBuild {
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
# 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.
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\\")
}
}

10
libs/opmapcontrol/src/internals/projections/lks94projection.cpp

@ -28,6 +28,11 @@ @@ -28,6 +28,11 @@
#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 {
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

15
libs/opmapcontrol/src/internals/projections/mercatorprojectionyandex.cpp

@ -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;
}
// 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)
{
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;
}
#ifndef Q_OS_WIN
#pragma GCC diagnostic pop
#endif
double MercatorProjectionYandex::Clip(const double &n, const double &minValue, const double &maxValue) const
{
return qMin(qMax(n, minValue), maxValue);

13
libs/qwt/qwt_plot_spectrogram.cpp

@ -533,6 +533,15 @@ QwtRasterData::ContourLines QwtPlotSpectrogram::renderContourLines( @@ -533,6 +533,15 @@ QwtRasterData::ContourLines QwtPlotSpectrogram::renderContourLines(
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
@ -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

11
libs/qwt/qwt_plot_zoomer.h

@ -85,8 +85,19 @@ public: @@ -85,8 +85,19 @@ public:
public slots:
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);
#ifndef Q_OS_WIN
#pragma GCC diagnostic pop
#endif
virtual void zoom(const QwtDoubleRect &);
virtual void zoom(int up);

2
libs/serialport/qserialport.pri

@ -55,4 +55,4 @@ unix:!symbian { @@ -55,4 +55,4 @@ unix:!symbian {
}
}
HEADERS += $$PUBLIC_HEADERS $$PRIVATE_HEADERS
HEADERS *= $$PUBLIC_HEADERS $$PRIVATE_HEADERS

13
qgroundcontrol.pro

@ -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
# do no change the warning level from what they are currently set to below.
# We treat all warnings as errors which must be fixed before proceeding. If you run into a problem you can't fix
# 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 {
QMAKE_CXXFLAGS_WARN_ON += -Wall
}
MacBuild {
QMAKE_CXXFLAGS_WARN_ON += -Werror
}
WindowsBuild {
QMAKE_CXXFLAGS_WARN_ON += /W3
QMAKE_CXXFLAGS_WARN_ON += /W3 \
/wd4996 \ # silence warnings about deprecated strcpy and whatnot
/wd4290 # ignore exception specifications
}
#

2
qupgrade

@ -1 +1 @@ @@ -1 +1 @@
Subproject commit b8b885c610ee574140c7a6ad9bc007dcf28a74b7
Subproject commit 2db4b382b02c3822acd19e99bc57fa53f3f53d01

12
src/ui/map3D/Q3DWidget.h

@ -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 <osgGA/TrackballManipulator>
#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>
#ifndef Q_OS_WIN
#pragma GCC diagnostic pop
#endif
#include "CameraParams.h"
#include "GCManipulator.h"
#include "SystemGroupNode.h"

Loading…
Cancel
Save