Bug 1256548 - Disable C4312 to unblock compilation on VS2015; r?dvander draft
authorGregory Szorc <gps@mozilla.com>
Mon, 14 Mar 2016 22:20:38 -0700
changeset 341287 676b66976e3eb19e4f883fb740d5e8929e95bc59
parent 341268 b5aecf0025ebc0d1910eb688a234bd5ebf295732
child 341290 c60be94b98ce623f2b43204917328ca82082c3ab
push id13180
push usergszorc@mozilla.com
push dateWed, 16 Mar 2016 20:54:06 +0000
reviewersdvander
bugs1256548
milestone48.0a1
Bug 1256548 - Disable C4312 to unblock compilation on VS2015; r?dvander 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. That being said, the underlying problem in the warning this fixes appears to be in a header from 3rd party WebRTC code, so our hands might be tied. MozReview-Commit-ID: E8JqPkYqxls
ipc/glue/moz.build
--- a/ipc/glue/moz.build
+++ b/ipc/glue/moz.build
@@ -131,16 +131,22 @@ SOURCES += [
     'BackgroundChildImpl.cpp',
     'BackgroundParentImpl.cpp',
     'FileDescriptorSetChild.cpp',
     'FileDescriptorSetParent.cpp',
     'GeckoChildProcessHost.cpp',
     'URIUtils.cpp',
 ]
 
+if CONFIG['_MSC_VER']:
+    # This is intended as a temporary hack to support building with VS2015.
+    # 'reinterpret_cast': conversion from 'DWORD' to 'HANDLE' of greater size
+    SOURCES['BackgroundChildImpl.cpp'].flags += ['-wd4312']
+    SOURCES['BackgroundParentImpl.cpp'].flags += ['-wd4312']
+
 LOCAL_INCLUDES += [
     '/caps',
     '/dom/broadcastchannel',
     '/dom/indexedDB',
     '/dom/workers',
     '/media/webrtc/trunk',
     '/xpcom/build',
 ]