Bug 1256558 - Disable C4311 to unblock compilation on VS2015; r?peterv draft
authorGregory Szorc <gps@mozilla.com>
Tue, 15 Mar 2016 21:13:47 -0700
changeset 340888 8b12ffb091596b3b15bd0369d236d47dabc74e99
parent 340887 1ce0475cb0f5fc24d12cd6a4cd4c85847b72d961
child 516292 95ca939c6cd54c6fa3bb08593ed43cfd2c72d63e
push id13090
push usergszorc@mozilla.com
push dateWed, 16 Mar 2016 04:15:13 +0000
reviewerspeterv
bugs1256558
milestone48.0a1
Bug 1256558 - Disable C4311 to unblock compilation on VS2015; r?peterv 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: 3TbgVPRb8Uo
parser/expat/lib/moz.build
--- a/parser/expat/lib/moz.build
+++ b/parser/expat/lib/moz.build
@@ -13,8 +13,14 @@ SOURCES += [
     'xmlparse.c',
     'xmlrole.c',
     'xmltok.c',
 ]
 
 FINAL_LIBRARY = 'gkmedias'
 
 DEFINES['HAVE_EXPAT_CONFIG_H'] = True
+
+if CONFIG['_MSC_VER']:
+    # This is intended as a temporary hack to support building with VS2015.
+    # 'type cast': pointer truncation from 'const char *' to 'unsigned long'
+    CFLAGS += ['-wd4311']
+