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 340307 ece696552678ab97663a0b1e5b031fedcf4a4e4a
parent 340306 aa78e1892cb0f8a45a715345326f3c5988624967
child 340308 60d01e8d9b034023a7c46908b35888c52fad71b5
push id12938
push usergszorc@mozilla.com
push dateTue, 15 Mar 2016 04:41:37 +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']