Bug 1257331 - Disable C4477 to unblock compilation on VS2015; r?froydnj
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: Gmxn11fos9I
--- a/xpcom/glue/standalone/moz.build
+++ b/xpcom/glue/standalone/moz.build
@@ -13,16 +13,22 @@ include('../objs.mozbuild')
SOURCES += xpcom_glue_src_cppsrcs
SOURCES += [
'../nsStringAPI.cpp',
'nsXPCOMGlue.cpp',
]
+if CONFIG['_MSC_VER']:
+ # This is intended as a temporary workaround to enable VS2015.
+ # xpcom/glue/standalone/nsXPCOMGlue.cpp(70): warning C4477: 'wprintf' :
+ # format string '%s' requires an argument of type 'wchar_t *', but variadic argument 2 has type 'LPVOID'
+ SOURCES['nsXPCOMGlue.cpp'].flags += ['-wd4477']
+
Library('xpcomglue')
EXPORTS += [
'nsXPCOMGlue.h',
]
SDK_LIBRARY = True
--- a/xpcom/glue/standalone/staticruntime/moz.build
+++ b/xpcom/glue/standalone/staticruntime/moz.build
@@ -21,16 +21,21 @@ SDK_LIBRARY = True
FORCE_STATIC_LIB = True
if CONFIG['_MSC_VER']:
DEFINES['_USE_ANSI_CPP'] = True
# Don't include directives about which CRT to use
CFLAGS += ['-Zl']
CXXFLAGS += ['-Zl']
+ # This is intended as a temporary workaround to enable VS2015.
+ # xpcom/glue/standalone/nsXPCOMGlue.cpp(70): warning C4477: 'wprintf' :
+ # format string '%s' requires an argument of type 'wchar_t *', but variadic argument 2 has type 'LPVOID'
+ SOURCES['../nsXPCOMGlue.cpp'].flags += ['-wd4477']
+
DEFINES['XPCOM_GLUE'] = True
LOCAL_INCLUDES += [
'../../../build',
'../../../threads',
]
# Statically link to the CRT on Windows
--- a/xpcom/glue/staticruntime/moz.build
+++ b/xpcom/glue/staticruntime/moz.build
@@ -21,16 +21,21 @@ SDK_LIBRARY = True
FORCE_STATIC_LIB = True
if CONFIG['_MSC_VER']:
DEFINES['_USE_ANSI_CPP'] = True
# Don't include directives about which CRT to use
CFLAGS += ['-Zl']
CXXFLAGS += ['-Zl']
+ # This is intended as a temporary workaround to enable VS2015.
+ # xpcom/glue/standalone/nsXPCOMGlue.cpp(70): warning C4477: 'wprintf' :
+ # format string '%s' requires an argument of type 'wchar_t *', but variadic argument 2 has type 'LPVOID'
+ CXXFLAGS += ['-wd4477']
+
LOCAL_INCLUDES += [
'../../build',
'../../threads',
]
# Statically link to the CRT on Windows
USE_STATIC_LIBS = True