Add build option to third_party/http2. No functional change.
I fixed build complains under http2/. However, adding the build rule in BUILD will require change files we don't own. This build failure is an example when adding build rule to BUILD: http://sponge2/26d093f0-c749-4709-b47d-4ba0646407a1.
PiperOrigin-RevId: 324931975
Change-Id: I9296361aaf97cbf36322a52cc017f33185859aa4
diff --git a/http2/decoder/decode_buffer_test.cc b/http2/decoder/decode_buffer_test.cc
index 73c9ec6..24953ef 100644
--- a/http2/decoder/decode_buffer_test.cc
+++ b/http2/decoder/decode_buffer_test.cc
@@ -6,8 +6,8 @@
#include <functional>
-#include "testing/gtest/include/gtest/gtest.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_logging.h"
+#include "net/third_party/quiche/src/http2/platform/api/http2_test_helpers.h"
#include "net/third_party/quiche/src/http2/test_tools/http2_random.h"
namespace http2 {
diff --git a/http2/decoder/decode_http2_structures_test.cc b/http2/decoder/decode_http2_structures_test.cc
index 37246c4..7ef145d 100644
--- a/http2/decoder/decode_http2_structures_test.cc
+++ b/http2/decoder/decode_http2_structures_test.cc
@@ -11,12 +11,12 @@
#include <string>
-#include "testing/gtest/include/gtest/gtest.h"
#include "net/third_party/quiche/src/http2/decoder/decode_buffer.h"
#include "net/third_party/quiche/src/http2/decoder/decode_status.h"
#include "net/third_party/quiche/src/http2/http2_constants.h"
#include "net/third_party/quiche/src/http2/http2_structures_test_util.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_logging.h"
+#include "net/third_party/quiche/src/http2/platform/api/http2_test_helpers.h"
#include "net/third_party/quiche/src/http2/test_tools/http2_random.h"
#include "net/third_party/quiche/src/http2/tools/http2_frame_builder.h"
#include "net/third_party/quiche/src/common/platform/api/quiche_string_piece.h"
diff --git a/http2/decoder/http2_frame_decoder_test.cc b/http2/decoder/http2_frame_decoder_test.cc
index c1825d4..9ed3138 100644
--- a/http2/decoder/http2_frame_decoder_test.cc
+++ b/http2/decoder/http2_frame_decoder_test.cc
@@ -9,7 +9,6 @@
#include <string>
#include <vector>
-#include "testing/gtest/include/gtest/gtest.h"
#include "net/third_party/quiche/src/http2/http2_constants.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_logging.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_test_helpers.h"
diff --git a/http2/decoder/http2_structure_decoder_test.cc b/http2/decoder/http2_structure_decoder_test.cc
index 1d36f3b..dc7f3de 100644
--- a/http2/decoder/http2_structure_decoder_test.cc
+++ b/http2/decoder/http2_structure_decoder_test.cc
@@ -23,7 +23,6 @@
#include <cstdint>
#include <string>
-#include "testing/gtest/include/gtest/gtest.h"
#include "net/third_party/quiche/src/http2/decoder/decode_buffer.h"
#include "net/third_party/quiche/src/http2/decoder/decode_status.h"
#include "net/third_party/quiche/src/http2/http2_constants.h"
diff --git a/http2/hpack/decoder/hpack_decoder_state_test.cc b/http2/hpack/decoder/hpack_decoder_state_test.cc
index 41a8453..eff1420 100644
--- a/http2/hpack/decoder/hpack_decoder_state_test.cc
+++ b/http2/hpack/decoder/hpack_decoder_state_test.cc
@@ -108,7 +108,7 @@
}
void SendIndexAndVerifyCallback(size_t index,
- HpackEntryType expected_type,
+ HpackEntryType /*expected_type*/,
const char* expected_name,
const char* expected_value) {
EXPECT_CALL(listener_, OnHeader(Eq(expected_name), Eq(expected_value)));
diff --git a/http2/hpack/decoder/hpack_decoder_string_buffer_test.cc b/http2/hpack/decoder/hpack_decoder_string_buffer_test.cc
index 9c30db7..9f3e2d3 100644
--- a/http2/hpack/decoder/hpack_decoder_string_buffer_test.cc
+++ b/http2/hpack/decoder/hpack_decoder_string_buffer_test.cc
@@ -8,8 +8,6 @@
#include <initializer_list>
-#include "testing/gmock/include/gmock/gmock.h"
-#include "testing/gtest/include/gtest/gtest.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_logging.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_string_utils.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_test_helpers.h"
diff --git a/http2/hpack/decoder/hpack_string_decoder_test.cc b/http2/hpack/decoder/hpack_string_decoder_test.cc
index 6c81b57..a5f6166 100644
--- a/http2/hpack/decoder/hpack_string_decoder_test.cc
+++ b/http2/hpack/decoder/hpack_string_decoder_test.cc
@@ -55,7 +55,8 @@
bool expected_huffman) {
return
[expected_str, expected_huffman, this](
- const DecodeBuffer& input, DecodeStatus status) -> AssertionResult {
+ const DecodeBuffer& /*input*/,
+ DecodeStatus /*status*/) -> AssertionResult {
AssertionResult result = Collected(expected_str, expected_huffman);
if (result) {
VERIFY_EQ(collector_,
diff --git a/http2/hpack/hpack_string_test.cc b/http2/hpack/hpack_string_test.cc
index 0673f5e..399d09f 100644
--- a/http2/hpack/hpack_string_test.cc
+++ b/http2/hpack/hpack_string_test.cc
@@ -8,7 +8,6 @@
#include <utility>
-#include "testing/gtest/include/gtest/gtest.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_logging.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_test_helpers.h"
diff --git a/http2/hpack/http2_hpack_constants_test.cc b/http2/hpack/http2_hpack_constants_test.cc
index b266554..d44072b 100644
--- a/http2/hpack/http2_hpack_constants_test.cc
+++ b/http2/hpack/http2_hpack_constants_test.cc
@@ -6,9 +6,8 @@
#include <sstream>
-#include "testing/gmock/include/gmock/gmock.h"
-#include "testing/gtest/include/gtest/gtest.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_logging.h"
+#include "net/third_party/quiche/src/http2/platform/api/http2_test_helpers.h"
namespace http2 {
namespace test {
diff --git a/http2/hpack/varint/hpack_varint_decoder_test.cc b/http2/hpack/varint/hpack_varint_decoder_test.cc
index 6a2cd23..450751f 100644
--- a/http2/hpack/varint/hpack_varint_decoder_test.cc
+++ b/http2/hpack/varint/hpack_varint_decoder_test.cc
@@ -35,8 +35,8 @@
uint32_t prefix_length,
uint64_t expected_value) {
Validator validator = [expected_value, this](
- const DecodeBuffer& db,
- DecodeStatus status) -> AssertionResult {
+ const DecodeBuffer& /*db*/,
+ DecodeStatus /*status*/) -> AssertionResult {
VERIFY_EQ(expected_value, decoder_.value())
<< "Value doesn't match expected: " << decoder_.value()
<< " != " << expected_value;
@@ -54,7 +54,7 @@
void DecodeExpectError(quiche::QuicheStringPiece data,
uint32_t prefix_length) {
- Validator validator = [](const DecodeBuffer& db,
+ Validator validator = [](const DecodeBuffer& /*db*/,
DecodeStatus status) -> AssertionResult {
VERIFY_EQ(DecodeStatus::kDecodeError, status);
return AssertionSuccess();
diff --git a/http2/hpack/varint/hpack_varint_round_trip_test.cc b/http2/hpack/varint/hpack_varint_round_trip_test.cc
index 59473a7..77e5fe8 100644
--- a/http2/hpack/varint/hpack_varint_round_trip_test.cc
+++ b/http2/hpack/varint/hpack_varint_round_trip_test.cc
@@ -55,8 +55,8 @@
// DecodeBuffer is decoded, each with a different segmentation of the input.
// Validate that decoder_.value() matches the expected value.
Validator validator = [expected_value, this](
- const DecodeBuffer& db,
- DecodeStatus status) -> AssertionResult {
+ const DecodeBuffer& /*db*/,
+ DecodeStatus /*status*/) -> AssertionResult {
if (decoder_.value() != expected_value) {
return AssertionFailure()
<< "Value doesn't match expected: " << decoder_.value()
diff --git a/http2/tools/random_decoder_test.cc b/http2/tools/random_decoder_test.cc
index 640e7e9..5842bd0 100644
--- a/http2/tools/random_decoder_test.cc
+++ b/http2/tools/random_decoder_test.cc
@@ -133,7 +133,8 @@
bool return_non_zero_on_first) {
std::shared_ptr<bool> zero_next(new bool);
*zero_next = !return_non_zero_on_first;
- return [zero_next](bool first, size_t offset, size_t remaining) -> size_t {
+ return [zero_next](bool /*first*/, size_t /*offset*/,
+ size_t /*remaining*/) -> size_t {
if (*zero_next) {
*zero_next = false;
return 0;
@@ -146,7 +147,7 @@
RandomDecoderTest::SelectSize RandomDecoderTest::SelectRandom(
bool return_non_zero_on_first) {
- return [this, return_non_zero_on_first](bool first, size_t offset,
+ return [this, return_non_zero_on_first](bool first, size_t /*offset*/,
size_t remaining) -> size_t {
uint32_t r = random_.Rand32();
if (first && return_non_zero_on_first) {
diff --git a/http2/tools/random_decoder_test.h b/http2/tools/random_decoder_test.h
index 40b1e44..60a9081 100644
--- a/http2/tools/random_decoder_test.h
+++ b/http2/tools/random_decoder_test.h
@@ -122,15 +122,15 @@
// Returns a SelectSize function for fast decoding, i.e. passing all that
// is available to the decoder.
static SelectSize SelectRemaining() {
- return [](bool first, size_t offset, size_t remaining) -> size_t {
+ return [](bool /*first*/, size_t /*offset*/, size_t remaining) -> size_t {
return remaining;
};
}
// Returns a SelectSize function for decoding a single byte at a time.
static SelectSize SelectOne() {
- return
- [](bool first, size_t offset, size_t remaining) -> size_t { return 1; };
+ return [](bool /*first*/, size_t /*offset*/,
+ size_t /*remaining*/) -> size_t { return 1; };
}
// Returns a SelectSize function for decoding a single byte at a time, where
@@ -149,7 +149,7 @@
const Validator& validator);
static Validator ToValidator(std::nullptr_t) {
- return [](const DecodeBuffer& input, DecodeStatus status) {
+ return [](const DecodeBuffer& /*input*/, DecodeStatus /*status*/) {
return ::testing::AssertionSuccess();
};
}
@@ -165,7 +165,7 @@
if (validator == nullptr) {
return ToValidator(nullptr);
}
- return [validator](const DecodeBuffer& input, DecodeStatus status) {
+ return [validator](const DecodeBuffer& /*input*/, DecodeStatus /*status*/) {
return validator();
};
}