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
--- 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']