Bug 1256028 - Disable C4477 to unblock compilation on VS2015; r?mcmanus draft
authorGregory Szorc <gps@mozilla.com>
Mon, 14 Mar 2016 18:44:26 -0700
changeset 340229 a9665df0c4d7f267694ee8b7bb8ce59ce50e663a
parent 340228 4a75cd1a15ef3c5c4166aaa793902d352bb29821
child 516150 b0d7b697aaa71c96a9b3e62dc203694c1fa8dcb9
push id12919
push usergszorc@mozilla.com
push dateTue, 15 Mar 2016 01:44:41 +0000
reviewersmcmanus
bugs1256028
milestone48.0a1
Bug 1256028 - Disable C4477 to unblock compilation on VS2015; r?mcmanus 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: 9AkkAUDMln6
xpcom/io/moz.build
--- a/xpcom/io/moz.build
+++ b/xpcom/io/moz.build
@@ -129,8 +129,14 @@ if CONFIG['GNU_CC']:
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
 if CONFIG['OS_ARCH'] == 'Linux' and 'lib64' in CONFIG['libdir']:
     DEFINES['HAVE_USR_LIB64_DIR'] = True
 
 LOCAL_INCLUDES += ['!..']
+
+if CONFIG['_MSC_VER']:
+    # This is intended as a temporary hack to support building with VS2015.
+    # '_snwprintf' : format string '%s' requires an argument of type 'wchar_t *',
+    # but variadic argument 3 has type 'char16ptr_t'
+    CXXFLAGS += ['-wd4477']