diff --git a/source/common/formatter/substitution_formatter.cc b/source/common/formatter/substitution_formatter.cc index 4400ca3f6510..aedc72ad87e1 100644 --- a/source/common/formatter/substitution_formatter.cc +++ b/source/common/formatter/substitution_formatter.cc @@ -424,7 +424,7 @@ class StreamInfoDurationFieldExtractor : public StreamInfoFormatter::FieldExtrac } private: - absl::optional extractMillis(const StreamInfo::StreamInfo& stream_info) const { + absl::optional extractMillis(const StreamInfo::StreamInfo& stream_info) const { const auto time = field_extractor_(stream_info); if (time) { return std::chrono::duration_cast(time.value()).count(); diff --git a/source/common/grpc/google_async_client_impl.h b/source/common/grpc/google_async_client_impl.h index f2dc3eded14d..75229bd5905f 100644 --- a/source/common/grpc/google_async_client_impl.h +++ b/source/common/grpc/google_async_client_impl.h @@ -255,7 +255,7 @@ class GoogleAsyncStreamImpl : public RawAsyncStream, // End-of-stream with no additional message. PendingMessage() = default; - const absl::optional buf_; + const absl::optional buf_{}; const bool end_stream_{true}; }; diff --git a/source/common/upstream/outlier_detection_impl.h b/source/common/upstream/outlier_detection_impl.h index ff42473f3cc0..c51cb134bfbf 100644 --- a/source/common/upstream/outlier_detection_impl.h +++ b/source/common/upstream/outlier_detection_impl.h @@ -41,7 +41,7 @@ class DetectorHostMonitorNullImpl : public DetectorHostMonitor { double successRate(SuccessRateMonitorType) const override { return -1; } private: - const absl::optional time_; + const absl::optional time_{}; }; /** diff --git a/source/extensions/common/aws/credentials_provider.h b/source/extensions/common/aws/credentials_provider.h index ed6bb312561c..7e1da55fb182 100644 --- a/source/extensions/common/aws/credentials_provider.h +++ b/source/extensions/common/aws/credentials_provider.h @@ -1,5 +1,6 @@ #pragma once +#include #include #include "envoy/common/pure.h" diff --git a/source/extensions/filters/http/grpc_http1_reverse_bridge/filter.cc b/source/extensions/filters/http/grpc_http1_reverse_bridge/filter.cc index 972b31275ff6..d13b360ee07f 100644 --- a/source/extensions/filters/http/grpc_http1_reverse_bridge/filter.cc +++ b/source/extensions/filters/http/grpc_http1_reverse_bridge/filter.cc @@ -140,7 +140,7 @@ Http::FilterHeadersStatus Filter::encodeHeaders(Http::ResponseHeaderMap& headers headers.setGrpcStatus(Envoy::Grpc::Status::WellKnownGrpcStatus::Unknown); headers.setStatus(enumToInt(Http::Code::OK)); - if (content_type != nullptr) { + if (!content_type.empty()) { headers.setContentType(content_type_); } diff --git a/tools/type_whisperer/api_type_db.h b/tools/type_whisperer/api_type_db.h index d5ee2dc7a324..cec5627588ea 100644 --- a/tools/type_whisperer/api_type_db.h +++ b/tools/type_whisperer/api_type_db.h @@ -1,5 +1,6 @@ #pragma once +#include #include #include "absl/strings/string_view.h"