From a66b050ecd0ac78a5aedca74a247ed4a2bf5a35f Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Wed, 22 Feb 2023 08:46:16 +0200 Subject: [PATCH] Suppress warnings. --- src/libs/qmuparser/text.h | 11 +++++++++++ src/libs/vmisc/backport/text.h | 12 +++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/libs/qmuparser/text.h b/src/libs/qmuparser/text.h index 1afd08e5b..0a3397202 100644 --- a/src/libs/qmuparser/text.h +++ b/src/libs/qmuparser/text.h @@ -32,6 +32,14 @@ #if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) #include + +#if QT_VERSION < QT_VERSION_CHECK(5, 5, 0) +#include "qmudef.h" +#endif // QT_VERSION < QT_VERSION_CHECK(5, 5, 0) + +QT_WARNING_PUSH +QT_WARNING_DISABLE_GCC("-Wunused-variable") + namespace Qt { //static auto endl = ::endl; @@ -39,6 +47,9 @@ namespace Qt static auto dec = ::dec; //static auto SkipEmptyParts = QString::SkipEmptyParts; } + +QT_WARNING_POP + #endif #endif // TEXT_H diff --git a/src/libs/vmisc/backport/text.h b/src/libs/vmisc/backport/text.h index 05bf70ce8..bd7e19672 100644 --- a/src/libs/vmisc/backport/text.h +++ b/src/libs/vmisc/backport/text.h @@ -29,9 +29,17 @@ #define TEXT_H #include -#include #if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) +#include + +#if QT_VERSION < QT_VERSION_CHECK(5, 5, 0) +#include "../vmisc/diagnostic.h" +#endif // QT_VERSION < QT_VERSION_CHECK(5, 5, 0) + +QT_WARNING_PUSH +QT_WARNING_DISABLE_GCC("-Wunused-variable") + namespace Qt { static auto endl = ::endl; @@ -39,6 +47,8 @@ static auto flush = ::flush; static auto dec = ::dec; static auto SkipEmptyParts = QString::SkipEmptyParts; } + +QT_WARNING_POP #endif #endif // TEXT_H