Bug 1256552 - Disable C4838 to unblock compilation on VS2015; r?jrmuizel draft
authorGregory Szorc <gps@mozilla.com>
Mon, 14 Mar 2016 23:04:23 -0700
changeset 340363 3dbcd3c1e6792fbc0ccf3673b8e718e66b8c488c
parent 340355 bb0c7f2876993aa3262c99c0f9e1bd2e4518c3bd
child 340364 ead300704333c6e0f48f642f06ff5ec94688d6f6
child 340371 426f24657438a08382f44aad65103fa079a04994
push id12949
push usergszorc@mozilla.com
push dateTue, 15 Mar 2016 06:05:12 +0000
reviewersjrmuizel
bugs1256552
milestone48.0a1
Bug 1256552 - Disable C4838 to unblock compilation on VS2015; r?jrmuizel As part of unblocking building with VS2015u1 in automation, I'm mass disabling compiler warnings that are turned into errors. This is not the preferred mechanism to fix compilation warnings. So hopefully this patch never lands because someone insists on fixing the underlying problem instead. But if it does land, hopefully the workaround is only temporary. MozReview-Commit-ID: AvAmWHM7MWv
gfx/2d/moz.build
gfx/thebes/moz.build
--- a/gfx/2d/moz.build
+++ b/gfx/2d/moz.build
@@ -75,16 +75,21 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wi
         'PathD2D.cpp',
         'RadialGradientEffectD2D1.cpp',
         'ScaledFontDWrite.cpp',
         'ScaledFontWin.cpp',
         'SourceSurfaceD2D1.cpp',
     ]
     DEFINES['WIN32'] = True
 
+    if CONFIG['_MSC_VER']:
+        # This is intended as a temporary hack to support building with VS2015.
+        # conversion from '*' to '*' requires a narrowing conversion
+        SOURCES['RadialGradientEffectD2D1.cpp'].flags += ['-wd4838']
+
 if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'windows':
     SOURCES += [
         'JobScheduler_posix.cpp',
     ]
 
 if CONFIG['MOZ_ENABLE_SKIA']:
     UNIFIED_SOURCES += [
         'convolver.cpp',
--- a/gfx/thebes/moz.build
+++ b/gfx/thebes/moz.build
@@ -183,16 +183,21 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wi
         UNIFIED_SOURCES += [
             'gfxDWriteFontList.cpp',
         ]
         SOURCES += [
             'gfxDWriteCommon.cpp',
             'gfxDWriteFonts.cpp',
         ]
 
+    if CONFIG['_MSC_VER']:
+        # This is intended as a temporary hack to support building with VS2015.
+        # conversion from '*' to '*' requires a narrowing conversion
+        SOURCES['gfxGDIFontList.cpp'].flags += ['-wd4838']
+
 # Are we targeting x86 or x64?  If so, build gfxAlphaRecoverySSE2.cpp.
 if CONFIG['INTEL_ARCHITECTURE']:
     SOURCES += ['gfxAlphaRecoverySSE2.cpp']
     # The file uses SSE2 intrinsics, so it needs special compile flags on some
     # compilers.
     SOURCES['gfxAlphaRecoverySSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
 
 SOURCES += [