cmake: Remove -Wcomma for C++ when using Qt >= 5.10

The Qt team introduced a lot of "Possible misuse of comma operator here"
warnings in qstring.h and qstringview.h in version 5.10.  Now we need to
fix the Qt source again.

Change-Id: I948ba5a224d4dca1ebb6a758100c064d501c1d4a
Reviewed-on: https://code.wireshark.org/review/24779
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
This commit is contained in:
Stig Bjørlykke 2017-12-12 09:18:57 +01:00
parent 621498f88e
commit 91f63908df
1 changed files with 12 additions and 1 deletions

View File

@ -464,7 +464,6 @@ else()
-Wno-overlength-strings
-Wno-long-long
-Wheader-guard
-Wcomma
)
#
@ -517,6 +516,11 @@ else()
# -Wimplicit-function-declaration into an error by default.
#
-Werror=implicit
#
# The Qt headers in version 5.10 introduced a lot of
# "Possible misuse of comma operator here" warnings.
#
-Wcomma
)
set(CXX_WARN_FLAGS
@ -530,6 +534,13 @@ else()
-Wshorten-64-to-32
)
endif()
if (Qt5Core_VERSION VERSION_LESS 5.10)
# The Qt headers in version 5.10 introduced a lot of
# "Possible misuse of comma operator here" warnings.
set(CXX_WARN_FLAGS ${CXX_WARN_FLAGS}
-Wcomma
)
endif()
#
# These are not enabled by default, because the warnings they