aboutsummaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-03-07 13:16:13 +0100
committerLars Knoll <lars.knoll@qt.io>2018-03-08 09:24:25 +0000
commitc6a26c248e8abc421b87c3dd6b2466d490ea902e (patch)
tree3135a2f552039a28245a8ab6d4697baabe7d397b /src/3rdparty
parentc99abf1851bbbfcec11eb77173df620746940ab0 (diff)
Fix compiler warnings on gcc 7.2
gcc 7.2 gives tons of warnings of the form: ./3rdparty/masm/wtf/Assertions.h:186:1: warning: this use of "defined" may not be portable [-Wexpansion-to-defined] In practice the marco expansion to (defined FOO && FOO) can safely be reduced to simply FOO, as #if FOO will expand to #if 0 if FOO is not defined. Change-Id: Idc1b09990725b99bbfa2c3bc949565254ea4174f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/masm/wtf/Compiler.h6
-rw-r--r--src/3rdparty/masm/wtf/Platform.h12
2 files changed, 9 insertions, 9 deletions
diff --git a/src/3rdparty/masm/wtf/Compiler.h b/src/3rdparty/masm/wtf/Compiler.h
index da10196cc1..598d7f2c1c 100644
--- a/src/3rdparty/masm/wtf/Compiler.h
+++ b/src/3rdparty/masm/wtf/Compiler.h
@@ -27,13 +27,13 @@
#define WTF_Compiler_h
/* COMPILER() - the compiler being used to build the project */
-#define COMPILER(WTF_FEATURE) (defined WTF_COMPILER_##WTF_FEATURE && WTF_COMPILER_##WTF_FEATURE)
+#define COMPILER(WTF_FEATURE) WTF_COMPILER_##WTF_FEATURE
/* COMPILER_SUPPORTS() - whether the compiler being used to build the project supports the given feature. */
-#define COMPILER_SUPPORTS(WTF_COMPILER_FEATURE) (defined WTF_COMPILER_SUPPORTS_##WTF_COMPILER_FEATURE && WTF_COMPILER_SUPPORTS_##WTF_COMPILER_FEATURE)
+#define COMPILER_SUPPORTS(WTF_COMPILER_FEATURE) WTF_COMPILER_SUPPORTS_##WTF_COMPILER_FEATURE
/* COMPILER_QUIRK() - whether the compiler being used to build the project requires a given quirk. */
-#define COMPILER_QUIRK(WTF_COMPILER_QUIRK) (defined WTF_COMPILER_QUIRK_##WTF_COMPILER_QUIRK && WTF_COMPILER_QUIRK_##WTF_COMPILER_QUIRK)
+#define COMPILER_QUIRK(WTF_COMPILER_QUIRK) WTF_COMPILER_QUIRK_##WTF_COMPILER_QUIRK
/* ==== COMPILER() - the compiler being used to build the project ==== */
diff --git a/src/3rdparty/masm/wtf/Platform.h b/src/3rdparty/masm/wtf/Platform.h
index 7f2023a68a..4f37245495 100644
--- a/src/3rdparty/masm/wtf/Platform.h
+++ b/src/3rdparty/masm/wtf/Platform.h
@@ -38,26 +38,26 @@
/* ==== PLATFORM handles OS, operating environment, graphics API, and
CPU. This macro will be phased out in favor of platform adaptation
macros, policy decision macros, and top-level port definitions. ==== */
-#define PLATFORM(WTF_FEATURE) (defined WTF_PLATFORM_##WTF_FEATURE && WTF_PLATFORM_##WTF_FEATURE)
+#define PLATFORM(WTF_FEATURE) WTF_PLATFORM_##WTF_FEATURE
/* ==== Platform adaptation macros: these describe properties of the target environment. ==== */
/* CPU() - the target CPU architecture */
-#define CPU(WTF_FEATURE) (defined WTF_CPU_##WTF_FEATURE && WTF_CPU_##WTF_FEATURE)
+#define CPU(WTF_FEATURE) WTF_CPU_##WTF_FEATURE
/* HAVE() - specific system features (headers, functions or similar) that are present or not */
-#define HAVE(WTF_FEATURE) (defined HAVE_##WTF_FEATURE && HAVE_##WTF_FEATURE)
+#define HAVE(WTF_FEATURE) HAVE_##WTF_FEATURE
/* OS() - underlying operating system; only to be used for mandated low-level services like
virtual memory, not to choose a GUI toolkit */
-#define OS(WTF_FEATURE) (defined WTF_OS_##WTF_FEATURE && WTF_OS_##WTF_FEATURE)
+#define OS(WTF_FEATURE) WTF_OS_##WTF_FEATURE
/* ==== Policy decision macros: these define policy choices for a particular port. ==== */
/* USE() - use a particular third-party library or optional OS service */
-#define USE(WTF_FEATURE) (defined WTF_USE_##WTF_FEATURE && WTF_USE_##WTF_FEATURE)
+#define USE(WTF_FEATURE) WTF_USE_##WTF_FEATURE
/* ENABLE() - turn on a specific feature of WebKit */
-#define ENABLE(WTF_FEATURE) (defined ENABLE_##WTF_FEATURE && ENABLE_##WTF_FEATURE)
+#define ENABLE(WTF_FEATURE) ENABLE_##WTF_FEATURE
/* ==== CPU() - the target CPU architecture ==== */