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 340041 7aa1ae5098c608c628bdbb7abe87ab8074cd98ce
parent 340040 dabd4a9ee62c09e73ada5f06ae20c81d357eeae5
child 340042 32cf390de19b0e500edb0f0e06d01865c07e49ac
child 340046 7b5ad0d12e3408e6a925676bdd318c9212f40d0b
push id12892
push usergszorc@mozilla.com
push dateMon, 14 Mar 2016 22:49:15 +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']