Bug 785440 - Disable warning C4324 when building security/certverifier. r?keeler draft
authorMarkus Stange <mstange@themasta.com>
Sun, 11 Feb 2018 00:32:14 -0500
changeset 753638 921a0eeaffec6f88f8ab2bb16363113cae029cfb
parent 752763 b01b4d5d4b1861ef9646c861c6d3393d977c0476
push id98617
push userbmo:mstange@themasta.com
push dateSun, 11 Feb 2018 14:24:36 +0000
reviewerskeeler
bugs785440
milestone60.0a1
Bug 785440 - Disable warning C4324 when building security/certverifier. r?keeler This warning is triggered by the use of alignas() in js/public/RootingAPI.h. Now that GeckoProfiler.h includes RootingAPI.h, this warning is encountered when building security/certverifier because GeckoProfiler.h is already being included transitively, through this inclusion path: CertVerifier.cpp -> CertVerifier.h -> Telemetry.h -> StartupTimeline.h -> GeckoProfiler.h However, this explanation is not entirely satisfactory, because there seems to be an existing inclusion path for RootingAPI.h already: CertVerifier.cpp -> CertVerifier.h -> BasePrincipal.h -> OriginAttributes.h -> ChromeUtils.h -> ChromeUtilsBinding.h -> RootingAPI.h So I'm not quite sure why this problem is only starting to happen now. MozReview-Commit-ID: AFuXpTjdPsi
security/certverifier/moz.build
--- a/security/certverifier/moz.build
+++ b/security/certverifier/moz.build
@@ -61,16 +61,17 @@ DIRS += [
 TEST_DIRS += [
     'tests/gtest',
 ]
 
 CXXFLAGS += ['-Wall']
 if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
     # -Wall with Visual C++ enables too many problematic warnings
     CXXFLAGS += [
+        '-wd4324', # structure was padded due to __declspec(align())
         '-wd4355', # 'this' used in base member initializer list
         '-wd4464', # relative include path contains '..'
         '-wd4480', # nonstandard extension used: specifying underlying type for
                    # enum 'enum'
         '-wd4481', # nonstandard extension used: override specifier 'keyword'
         '-wd4510', # default constructor could not be generated
         '-wd4512', # assignment operator could not be generated
         '-wd4514', # 'function': unreferenced inline function has been removed