Skip to content

Commit

Permalink
tidy: fix clang-diagnostic-errors (envoyproxy#12507)
Browse files Browse the repository at this point in the history
Signed-off-by: Lizan Zhou <lizan@tetrate.io>
Signed-off-by: chaoqinli <chaoqinli@google.com>
  • Loading branch information
lizan authored and chaoqinli committed Aug 7, 2020
1 parent 5db61fd commit 47c3472
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 2 deletions.
1 change: 1 addition & 0 deletions include/envoy/http/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ envoy_cc_library(
deps = [
":header_map_interface",
"//include/envoy/network:address_interface",
"//include/envoy/stream_info:filter_state_interface",
],
)

Expand Down
1 change: 1 addition & 0 deletions include/envoy/ssl/connection.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once

#include <memory>
#include <string>

#include "envoy/common/pure.h"
Expand Down
5 changes: 4 additions & 1 deletion source/common/http/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,10 @@ envoy_cc_library(
envoy_cc_library(
name = "exception_lib",
hdrs = ["exception.h"],
deps = ["//include/envoy/http:header_map_interface"],
deps = [
"//include/envoy/http:codes_interface",
"//include/envoy/http:header_map_interface",
],
)

envoy_cc_library(
Expand Down
2 changes: 2 additions & 0 deletions source/common/protobuf/well_known.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#pragma once

#include <cstdint>

namespace Envoy {
namespace ProtobufWellKnown {

Expand Down
1 change: 1 addition & 0 deletions source/extensions/common/wasm/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ envoy_cc_library(
name = "wasm_vm_base",
hdrs = ["wasm_vm_base.h"],
deps = [
":wasm_vm_interface",
"//source/common/stats:stats_lib",
],
)
Expand Down
2 changes: 1 addition & 1 deletion source/extensions/common/wasm/wasm_vm_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class WasmVmBase : public WasmVm {
stats_.active_.inc();
ENVOY_LOG(debug, "WasmVm created {} now active", runtime_, stats_.active_.value());
}
virtual ~WasmVmBase() {
~WasmVmBase() override {
stats_.active_.dec();
ENVOY_LOG(debug, "~WasmVm {} {} remaining active", runtime_, stats_.active_.value());
}
Expand Down
1 change: 1 addition & 0 deletions source/extensions/filters/http/dynamo/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <string>

#include "envoy/extensions/filters/http/dynamo/v3/dynamo.pb.h"
#include "envoy/extensions/filters/http/dynamo/v3/dynamo.pb.validate.h"
#include "envoy/server/filter_config.h"

#include "extensions/filters/http/common/factory_base.h"
Expand Down
1 change: 1 addition & 0 deletions source/extensions/filters/http/on_demand/config.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include "envoy/config/filter/http/on_demand/v2/on_demand.pb.h"
#include "envoy/config/filter/http/on_demand/v2/on_demand.pb.validate.h"

#include "extensions/filters/http/common/factory_base.h"
#include "extensions/filters/http/well_known_names.h"
Expand Down
2 changes: 2 additions & 0 deletions source/extensions/filters/network/kafka/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ envoy_cc_library(
],
deps = [
":serialization_lib",
":tagged_fields_lib",
],
)

Expand Down Expand Up @@ -160,6 +161,7 @@ envoy_cc_library(
],
deps = [
":serialization_lib",
":tagged_fields_lib",
],
)

Expand Down
1 change: 1 addition & 0 deletions source/extensions/health_checkers/redis/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ envoy_cc_library(
name = "utility",
hdrs = ["utility.h"],
deps = [
"//source/common/config:utility_lib",
"//source/common/protobuf",
"//source/common/protobuf:utility_lib",
"@envoy_api//envoy/config/core/v3:pkg_cc_proto",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,40 @@
#include "absl/strings/str_cat.h"
#include "absl/strings/str_format.h"
#include "fmt/printf.h"
#include "quiche/common/platform/api/quiche_string_piece.h"

namespace spdy {

template <typename... Args>
// NOLINTNEXTLINE(readability-identifier-naming)
inline void SpdyStrAppendImpl(std::string* output, const Args&... args) {
absl::StrAppend(output, std::forward<const Args&>(args)...);
}

// NOLINTNEXTLINE(readability-identifier-naming)
inline char SpdyHexDigitToIntImpl(char c) { return quiche::HexDigitToInt(c); }

// NOLINTNEXTLINE(readability-identifier-naming)
inline std::string SpdyHexDecodeImpl(absl::string_view data) {
return absl::HexStringToBytes(data);
}

// NOLINTNEXTLINE(readability-identifier-naming)
inline bool SpdyHexDecodeToUInt32Impl(absl::string_view data, uint32_t* out) {
return quiche::HexDecodeToUInt32(data, out);
}

// NOLINTNEXTLINE(readability-identifier-naming)
inline std::string SpdyHexEncodeImpl(const void* bytes, size_t size) {
return absl::BytesToHexString(absl::string_view(static_cast<const char*>(bytes), size));
}

// NOLINTNEXTLINE(readability-identifier-naming)
inline std::string SpdyHexEncodeUInt32AndTrimImpl(uint32_t data) {
return absl::StrCat(absl::Hex(data));
}

// NOLINTNEXTLINE(readability-identifier-naming)
inline std::string SpdyHexDumpImpl(absl::string_view data) { return quiche::HexDump(data); }

struct SpdyStringPieceCaseHashImpl {
Expand Down

0 comments on commit 47c3472

Please sign in to comment.