From a6756f204349837195f4067cc2423c6363fa4ebf Mon Sep 17 00:00:00 2001 From: Mathew Sutcliffe Date: Tue, 13 Aug 2013 23:21:12 +0100 Subject: [PATCH] suppress/fix a few more GCC and MSVC warnings and errors --- samples/blackmiscquantities_dbus/testservicetool.h | 2 ++ samples/com_client/client.cpp | 2 +- src/blackbox/dialog_connect.cpp | 6 ++++-- src/blackmisc/avioadfsystem.h | 1 + src/blackmisc/avtrack.h | 4 ++-- src/blackmisc/mathmatrixbase.cpp | 1 + src/blackmisc/pqphysicalquantity.h | 5 +++-- 7 files changed, 14 insertions(+), 7 deletions(-) diff --git a/samples/blackmiscquantities_dbus/testservicetool.h b/samples/blackmiscquantities_dbus/testservicetool.h index 125db190e..5d5f2a2c4 100644 --- a/samples/blackmiscquantities_dbus/testservicetool.h +++ b/samples/blackmiscquantities_dbus/testservicetool.h @@ -5,7 +5,9 @@ #include #ifdef Q_OS_WIN // for qdatetime, see here http://qt-project.org/forums/viewthread/22133 +#ifndef NOMINMAX #define NOMINMAX +#endif #include // for Sleep #endif diff --git a/samples/com_client/client.cpp b/samples/com_client/client.cpp index 4fdb3e1aa..4f1eb8a1c 100644 --- a/samples/com_client/client.cpp +++ b/samples/com_client/client.cpp @@ -19,7 +19,7 @@ Client::~Client() { } -void Client::onError(QAbstractSocket::SocketError error, QString message) +void Client::onError(QAbstractSocket::SocketError /* error */, QString message) { bAppWarning << "Socket error!"; } diff --git a/src/blackbox/dialog_connect.cpp b/src/blackbox/dialog_connect.cpp index 956288dd4..802430a48 100644 --- a/src/blackbox/dialog_connect.cpp +++ b/src/blackbox/dialog_connect.cpp @@ -13,8 +13,10 @@ using namespace BlackMisc; CDialogConnect::CDialogConnect(QWidget *parent) : - QDialog(parent), m_hasComConnection(false), - ui(new Ui::CDialogConnect), comclient(IContext::getInstance()) + QDialog(parent), + ui(new Ui::CDialogConnect), + comclient(IContext::getInstance()), + m_hasComConnection(false) { ui->setupUi(this); diff --git a/src/blackmisc/avioadfsystem.h b/src/blackmisc/avioadfsystem.h index e74914ee5..8a65aa16f 100644 --- a/src/blackmisc/avioadfsystem.h +++ b/src/blackmisc/avioadfsystem.h @@ -7,6 +7,7 @@ #define BLACKMISC_AVIOADFSYSTEM_H #include "blackmisc/aviomodulator.h" +#include namespace BlackMisc { diff --git a/src/blackmisc/avtrack.h b/src/blackmisc/avtrack.h index d9e88dd15..e31135998 100644 --- a/src/blackmisc/avtrack.h +++ b/src/blackmisc/avtrack.h @@ -111,8 +111,8 @@ public: bool isMagneticTrack() const { return this->m_magnetic; - QT_TRANSLATE_NOOP("Aviation", "magnetic"); - QT_TRANSLATE_NOOP("Aviation", "true"); + (void)QT_TRANSLATE_NOOP("Aviation", "magnetic"); + (void)QT_TRANSLATE_NOOP("Aviation", "true"); } /*! diff --git a/src/blackmisc/mathmatrixbase.cpp b/src/blackmisc/mathmatrixbase.cpp index e2113a91b..6d6d5819a 100644 --- a/src/blackmisc/mathmatrixbase.cpp +++ b/src/blackmisc/mathmatrixbase.cpp @@ -5,6 +5,7 @@ #include "blackmisc/mathmatrix3x3.h" #include "blackmisc/mathmatrix3x1.h" +#include namespace BlackMisc { diff --git a/src/blackmisc/pqphysicalquantity.h b/src/blackmisc/pqphysicalquantity.h index 18aefe77e..18fa3c275 100644 --- a/src/blackmisc/pqphysicalquantity.h +++ b/src/blackmisc/pqphysicalquantity.h @@ -14,6 +14,7 @@ #include #include #include +#include namespace BlackMisc { @@ -459,10 +460,10 @@ public: { qRegisterMetaType(typeid(MU).name()); qDBusRegisterMetaType(); - qDBusRegisterMetaType>(); + qDBusRegisterMetaType >(); qRegisterMetaType(typeid(PQ).name()); qDBusRegisterMetaType(); - qDBusRegisterMetaType>(); + qDBusRegisterMetaType >(); } };