Bug 889136: Disable MSVC warning C4200 ("nonstandard extension used") for DataChannel.cpp's #include of a third-party header. r=jesup
authorDaniel Holbert <dholbert@cs.stanford.edu>
Tue, 02 Jul 2013 12:56:04 -0700
changeset 137237 477d313cc2ab70d0afc2c54684f01684dd47be83
parent 137236 c94fdeb1fa666619c7bf63cc7b743dc791aa39fe
child 137238 d22d48dff478f775d311a1f211bf46400ca3f25f
push id1824
push userryanvm@gmail.com
push dateWed, 03 Jul 2013 18:16:56 +0000
treeherderfx-team@dcbbfcdf7bb4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup
bugs889136
milestone25.0a1
Bug 889136: Disable MSVC warning C4200 ("nonstandard extension used") for DataChannel.cpp's #include of a third-party header. r=jesup
netwerk/sctp/datachannel/DataChannel.cpp
--- a/netwerk/sctp/datachannel/DataChannel.cpp
+++ b/netwerk/sctp/datachannel/DataChannel.cpp
@@ -8,18 +8,31 @@
 #include <stdlib.h>
 #include <iostream>
 #if !defined(__Userspace_os_Windows)
 #include <arpa/inet.h>
 #endif
 
 #define SCTP_DEBUG 1
 #define SCTP_STDINT_INCLUDE "mozilla/StandardInteger.h"
+
+#ifdef _MSC_VER
+// Disable "warning C4200: nonstandard extension used : zero-sized array in
+//          struct/union"
+// ...which the third-party file usrsctp.h runs afoul of.
+#pragma warning(push)
+#pragma warning(disable:4200)
+#endif
+
 #include "usrsctp.h"
 
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
 #include "DataChannelLog.h"
 
 #include "nsServiceManagerUtils.h"
 #include "nsIObserverService.h"
 #include "nsIObserver.h"
 #include "mozilla/Services.h"
 #include "nsThreadUtils.h"
 #include "nsAutoPtr.h"