Bug 1256530 - Disable C4312 to unblock compilation on VS2015; r?smaug draft
authorGregory Szorc <gps@mozilla.com>
Mon, 14 Mar 2016 21:09:32 -0700
changeset 340315 cc286902146123c92386827f3d321be8ab90ab77
parent 340314 53e30d2c41bbcbb7f4a8a5d00607d949eac59f92
child 340316 74df24a2a9ec64d35744fb89c0d0c8ba9690c661
push id12938
push usergszorc@mozilla.com
push dateTue, 15 Mar 2016 04:41:37 +0000
reviewerssmaug
bugs1256530
milestone48.0a1
Bug 1256530 - Disable C4312 to unblock compilation on VS2015; r?smaug 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: BXytOjiy0uX
parser/html/moz.build
--- a/parser/html/moz.build
+++ b/parser/html/moz.build
@@ -95,8 +95,13 @@ FINAL_LIBRARY = 'xul'
 # DEFINES['ENABLE_VOID_MENUITEM'] = True
 
 LOCAL_INCLUDES += [
     '/dom/base',
 ]
 
 if CONFIG['CLANG_CXX']:
     CXXFLAGS += ['-Wno-implicit-fallthrough']
+
+if CONFIG['_MSC_VER']:
+    # This is intended as a temporary hack to support building with VS2015.
+    # 'type cast': conversion from 'unsigned int' to 'nsIContent *' of greater size
+    CXXFLAGS += ['-wd4312']