gfe-relnote: n/a(code clean up) Apply quic compile options to spdy/core
code.
These options are added to enhance cross platfrom compatibility. As spdy is also part of QUICHE, it's good to apply these options as well.
Fix all the violations under third_party/spdy/core.
Platform-ize gunit, gmock and gunit_main
PiperOrigin-RevId: 255038615
Change-Id: I6ad003f68679f8adf4b2582c7dea3b6b950f0acc
diff --git a/spdy/core/http2_frame_decoder_adapter.cc b/spdy/core/http2_frame_decoder_adapter.cc
index e5e3e9a..5a59a8e 100644
--- a/spdy/core/http2_frame_decoder_adapter.cc
+++ b/spdy/core/http2_frame_decoder_adapter.cc
@@ -76,8 +76,9 @@
// Overwrites the fields of the header with invalid values, for the purpose
// of identifying reading of unset fields. Only takes effect for debug builds.
// In Address Sanatizer builds, it also marks the fields as un-readable.
-void CorruptFrameHeader(Http2FrameHeader* header) {
+void CorruptFrameHeader(Http2FrameHeader*
#ifndef NDEBUG
+ header) {
// Beyond a valid payload length, which is 2^24 - 1.
header->payload_length = 0x1010dead;
// An unsupported frame type.
@@ -88,6 +89,8 @@
// A stream id with the reserved high-bit (R in the RFC) set.
// 2129510127 when the high-bit is cleared.
header->stream_id = 0xfeedbeef;
+#else
+ /*header*/) {
#endif
}
@@ -455,7 +458,7 @@
}
}
-void Http2DecoderAdapter::OnPadding(const char* padding,
+void Http2DecoderAdapter::OnPadding(const char* /*padding*/,
size_t skipped_length) {
SPDY_DVLOG(1) << "OnPadding: " << skipped_length;
if (frame_header_.type == Http2FrameType::DATA) {
@@ -1015,8 +1018,8 @@
namespace spdy {
-bool SpdyFramerVisitorInterface::OnGoAwayFrameData(const char* goaway_data,
- size_t len) {
+bool SpdyFramerVisitorInterface::OnGoAwayFrameData(const char* /*goaway_data*/,
+ size_t /*len*/) {
return true;
}