Bug 1256024 - Disable C4838 to unblock compilation on VS2015; r?aklotz draft
authorGregory Szorc <gps@mozilla.com>
Mon, 14 Mar 2016 15:21:09 -0700
changeset 340036 3bf765ad6bc6d21e36aff2f5bcfc7968d62825c2
parent 340034 62d93df1226482ed0a284ad22359dc48d8b47600
child 516128 87d28a3066680d16182e2ded782d2c91802b6430
push id12889
push usergszorc@mozilla.com
push dateMon, 14 Mar 2016 22:21:24 +0000
reviewersaklotz
bugs1256024
milestone48.0a1
Bug 1256024 - Disable C4838 to unblock compilation on VS2015; r?aklotz 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 of fixing the underlying problem instead. But if it does land, hopefully the workaround is only temporary. MozReview-Commit-ID: Gcq3Qna02iB
dom/plugins/ipc/moz.build
dom/plugins/test/testplugin/testplugin.mozbuild
--- a/dom/plugins/ipc/moz.build
+++ b/dom/plugins/ipc/moz.build
@@ -142,8 +142,13 @@ DEFINES['FORCE_PR_LOG'] = True
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gtk3':
     CXXFLAGS += CONFIG['TK_CFLAGS']
 else:
     # Force build against gtk+2 for struct offsets and such.
     CXXFLAGS += CONFIG['MOZ_GTK2_CFLAGS']
 
 CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
+
+if CONFIG['_MSC_VER']:
+    # This is intended as a temporary hack to support building with VS2015.
+    # conversion from 'X' to 'Y' requires a narrowing conversion
+    CXXFLAGS += ['-wd4838']
--- a/dom/plugins/test/testplugin/testplugin.mozbuild
+++ b/dom/plugins/test/testplugin/testplugin.mozbuild
@@ -64,8 +64,13 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk
     OS_LIBS += CONFIG['XEXT_LIBS']
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt':
     CXXFLAGS += CONFIG['MOZ_QT_CFLAGS']
     CFLAGS += CONFIG['MOZ_QT_CFLAGS']
     OS_LIBS += CONFIG['MOZ_QT_LIBS']
     OS_LIBS += CONFIG['XLDFLAGS']
     OS_LIBS += CONFIG['XLIBS']
+
+if CONFIG['_MSC_VER']:
+    # This is intended as a temporary hack to support building with VS2015.
+    # conversion from 'X' to 'Y' requires a narrowing conversion
+    CXXFLAGS += ['-wd4838']