Bug 1256559 - Disable C4477 to unblock compilation on VS2015; r?smontagu draft
authorGregory Szorc <gps@mozilla.com>
Mon, 14 Mar 2016 23:11:06 -0700
changeset 340370 1abacc0bc224567710432f759db61e77867335e7
parent 340369 7bf09107a4771b2c7c34e9fabdc79e828f062152
child 516174 1051cdaac024ffaf287989d343ab8ee497c51dfa
push id12950
push usergszorc@mozilla.com
push dateTue, 15 Mar 2016 06:11:20 +0000
reviewerssmontagu
bugs1256559
milestone48.0a1
Bug 1256559 - Disable C4477 to unblock compilation on VS2015; r?smontagu 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: CdsqzfRziID
intl/locale/windows/moz.build
--- a/intl/locale/windows/moz.build
+++ b/intl/locale/windows/moz.build
@@ -6,16 +6,22 @@
 
 SOURCES += [
     'nsCollationWin.cpp',
     'nsDateTimeFormatWin.cpp',
     'nsWin32Locale.cpp',
     'nsWinCharset.cpp',
 ]
 
+if CONFIG['_MSC_VER']:
+    # This is intended as a temporary hack to support building with VS2015.
+    # 'fprintf' : format string '%d' requires an argument of type
+    # 'int', but variadic argument 1 has type 'size_t'
+    SOURCES['nsWin32Locale.cpp'].flags += ['-wd4477']
+
 FINAL_LIBRARY = 'xul'
 
 GENERATED_FILES = [
     'wincharset.properties.h',
 ]
 wincharset = GENERATED_FILES['wincharset.properties.h']
 wincharset.script = '../props2arrays.py'
 wincharset.inputs = ['wincharset.properties']