Bug 1256027 - Disable C4477 to unblock compilation on VS2015; r?bsmedberg draft
authorGregory Szorc <gps@mozilla.com>
Mon, 14 Mar 2016 19:48:25 -0700
changeset 340308 60d01e8d9b034023a7c46908b35888c52fad71b5
parent 340307 ece696552678ab97663a0b1e5b031fedcf4a4e4a
child 340309 51e145730f37c17a53c3ac4f66d4615f5253c45a
push id12938
push usergszorc@mozilla.com
push dateTue, 15 Mar 2016 04:41:37 +0000
reviewersbsmedberg
bugs1256027
milestone48.0a1
Bug 1256027 - Disable C4477 to unblock compilation on VS2015; r?bsmedberg 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: lwdVbcn8ap
toolkit/xre/moz.build
--- a/toolkit/xre/moz.build
+++ b/toolkit/xre/moz.build
@@ -179,8 +179,14 @@ CXXFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS
 
 if CONFIG['MOZ_WIDGET_GTK']:
     CXXFLAGS += CONFIG['MOZ_PANGO_CFLAGS']
 
 DEFINES['TOPOBJDIR'] = TOPOBJDIR
 FINAL_TARGET_PP_FILES += [
     'platform.ini'
 ]
+
+if CONFIG['_MSC_VER']:
+    # This is intended as a temporary hack to support building with VS2015.
+    # 'wprintf' : format string '%s' requires an argument of type 'wchar_t *',
+    # but variadic argument 1 has type 'LPVOID'
+    CXXFLAGS += ['-wd4477']