diff --git a/QGCCommon.pri b/QGCCommon.pri index 1d04930457dca39ec7239d4ee895c028709fa271..c8671374f52e1b76851ba76d637eb776b8e5ae51 100644 --- a/QGCCommon.pri +++ b/QGCCommon.pri @@ -167,6 +167,10 @@ MacBuild | LinuxBuild { WarningsAsErrorsOn { QMAKE_CXXFLAGS_WARN_ON += -Werror } + MacBuild { + # Latest clang version has a buggy check for this which cause Qt headers to throw warnings on qmap.h + QMAKE_CXXFLAGS_WARN_ON += -Wno-return-stack-address + } } WindowsBuild { diff --git a/src/QGCFileDialog.h b/src/QGCFileDialog.h index f6d4fced1cfefdfc987facf7a18a553a35e72b57..a0bf9123e3fd93e5bfd2c39e425dde395af64fdb 100644 --- a/src/QGCFileDialog.h +++ b/src/QGCFileDialog.h @@ -134,7 +134,7 @@ public: private slots: /// @brief The exec slot is private because we only want QGCFileDialog users to use the static methods. Otherwise it will break /// unit testing. - int exec(void) { return QGCFileDialog::exec(); } + int exec(void) { return QFileDialog::exec(); } private: static void _validate(Options& options); diff --git a/src/ui/QGCDataPlot2D.cc b/src/ui/QGCDataPlot2D.cc index bcfaecf8ae38ea014a6419423a73fad5331eded9..0657e264c6e57b5a36ccf63114f07f8b00875883 100644 --- a/src/ui/QGCDataPlot2D.cc +++ b/src/ui/QGCDataPlot2D.cc @@ -644,8 +644,8 @@ bool QGCDataPlot2D::calculateRegression(QString xName, QString yName, QString me function = tr("Regression method %1 not found").arg(method); } - delete x; - delete y; + delete[] x; + delete[] y; } else { // xName == yName function = tr("Please select different X and Y dimensions, not %1 = %2").arg(xName, yName);