diff --git a/QGCSetup.pri b/QGCSetup.pri index 95f4c012020c1d5743d81885da9b0e4df3bb94f1..894bf1dbf3863b9604e486494cac849c95d8f695 100644 --- a/QGCSetup.pri +++ b/QGCSetup.pri @@ -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\\") } } diff --git a/libs/opmapcontrol/src/internals/projections/lks94projection.cpp b/libs/opmapcontrol/src/internals/projections/lks94projection.cpp index f8a37c0be4f3077c071624ccf27596c8661080f5..4b72d57ceb2378285dc3515c869cca0b312d5045 100644 --- a/libs/opmapcontrol/src/internals/projections/lks94projection.cpp +++ b/libs/opmapcontrol/src/internals/projections/lks94projection.cpp @@ -28,6 +28,11 @@ #include +// 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) } } + +#ifdef Q_OS_LINUX +#pragma GCC diagnostic pop +#endif + diff --git a/libs/opmapcontrol/src/internals/projections/mercatorprojectionyandex.cpp b/libs/opmapcontrol/src/internals/projections/mercatorprojectionyandex.cpp index a6a2ba3066b5da21f45d1a0a9940d1628ad0c0fc..81b47b6d7748da54114dbb6862a04ec6afaf76e1 100644 --- a/libs/opmapcontrol/src/internals/projections/mercatorprojectionyandex.cpp +++ b/libs/opmapcontrol/src/internals/projections/mercatorprojectionyandex.cpp @@ -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, 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); diff --git a/libs/qwt/qwt_plot_spectrogram.cpp b/libs/qwt/qwt_plot_spectrogram.cpp index 152a6a38129904cf76d211f7d124e4fc5e964307..75622ab7eeed2228d6cf46ba6cfd73a53c3054c5 100644 --- a/libs/qwt/qwt_plot_spectrogram.cpp +++ b/libs/qwt/qwt_plot_spectrogram.cpp @@ -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, } } +#ifndef Q_OS_WIN +#pragma GCC diagnostic pop +#endif + /*! \brief Draw the spectrogram diff --git a/libs/qwt/qwt_plot_zoomer.h b/libs/qwt/qwt_plot_zoomer.h index eb27059b8e7262a0792ec419a971301ffe8ba930..9904c53aeebb59a186981bdab35b22f7f8d3d5eb 100644 --- a/libs/qwt/qwt_plot_zoomer.h +++ b/libs/qwt/qwt_plot_zoomer.h @@ -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); diff --git a/libs/serialport/qserialport.pri b/libs/serialport/qserialport.pri index 9de6a7ab05f6d50072774e49bc7adb53c0609e04..1210834c2434eebff91a90fab7806c7370ec27cb 100644 --- a/libs/serialport/qserialport.pri +++ b/libs/serialport/qserialport.pri @@ -55,4 +55,4 @@ unix:!symbian { } } -HEADERS += $$PUBLIC_HEADERS $$PRIVATE_HEADERS +HEADERS *= $$PUBLIC_HEADERS $$PRIVATE_HEADERS diff --git a/qgroundcontrol.pro b/qgroundcontrol.pro index e16dc23f70a3685949fd1a324bf15994f904025a..4e0fec940cf7edd4e8a13c9a09da4117a17150d8 100644 --- a/qgroundcontrol.pro +++ b/qgroundcontrol.pro @@ -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 } # diff --git a/qupgrade b/qupgrade index b8b885c610ee574140c7a6ad9bc007dcf28a74b7..2db4b382b02c3822acd19e99bc57fa53f3f53d01 160000 --- a/qupgrade +++ b/qupgrade @@ -1 +1 @@ -Subproject commit b8b885c610ee574140c7a6ad9bc007dcf28a74b7 +Subproject commit 2db4b382b02c3822acd19e99bc57fa53f3f53d01 diff --git a/src/ui/map3D/Q3DWidget.h b/src/ui/map3D/Q3DWidget.h index 32b9dc46415567c443e16b3a3c18ca99280129ad..037de8aa9b01916fe5bb3cdd10510602d25e3c43 100644 --- a/src/ui/map3D/Q3DWidget.h +++ b/src/ui/map3D/Q3DWidget.h @@ -39,8 +39,20 @@ This file is part of the QGROUNDCONTROL project #include #include #include + +// 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 +#ifndef Q_OS_WIN +#pragma GCC diagnostic pop +#endif + #include "CameraParams.h" #include "GCManipulator.h" #include "SystemGroupNode.h"