Skip to content

Commit 8c9e00e

Browse files
authored
Merge pull request #717 from open-telemetry/main
merged from upstream
2 parents 4283fd4 + 082620c commit 8c9e00e

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

api/include/opentelemetry/baggage/baggage.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ class Baggage
121121
}
122122

123123
nostd::shared_ptr<Baggage> baggage(new Baggage(cnt));
124-
bool kv_valid;
124+
bool kv_valid{false};
125125
nostd::string_view key, value;
126126

127127
while (kv_str_tokenizer.next(kv_valid, key, value) && baggage->kv_properties_->Size() < cnt)

api/include/opentelemetry/trace/propagation/http_trace_context.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class HttpTraceContext : public context::propagation::TextMapPropagator
8080

8181
static TraceFlags TraceFlagsFromHex(nostd::string_view trace_flags)
8282
{
83-
uint8_t flags;
83+
uint8_t flags{0};
8484
detail::HexToBinary(trace_flags, &flags, sizeof(flags));
8585
return TraceFlags(flags);
8686
}
@@ -140,7 +140,7 @@ class HttpTraceContext : public context::propagation::TextMapPropagator
140140
}
141141

142142
// hex is valid, convert it to binary
143-
uint8_t version_binary;
143+
uint8_t version_binary{kInvalidVersion};
144144
detail::HexToBinary(version_hex, &version_binary, sizeof(version_binary));
145145
if (version_binary == kInvalidVersion)
146146
{

api/include/opentelemetry/trace/propagation/jaeger.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class JaegerPropagator : public context::propagation::TextMapPropagator
112112
return SpanContext::GetInvalid();
113113
}
114114

115-
uint8_t flags;
115+
uint8_t flags{0};
116116
if (!detail::HexToBinary(flags_hex, &flags, sizeof(flags)))
117117
{
118118
return SpanContext::GetInvalid();

api/include/opentelemetry/trace/trace_state.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class TraceState
6464
}
6565

6666
nostd::shared_ptr<TraceState> ts(new TraceState(cnt));
67-
bool kv_valid;
67+
bool kv_valid{false};
6868
nostd::string_view key, value;
6969
while (kv_str_tokenizer.next(kv_valid, key, value) && ts->kv_properties_->Size() < cnt)
7070
{

sdk/include/opentelemetry/sdk/metrics/view/view_registry.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class ViewRegistry
6868

6969
if (aggregation_type == AggregationType::kDefault)
7070
{
71-
bool is_monotonic;
71+
bool is_monotonic{false};
7272
aggregation_type = DefaultAggregation::GetDefaultAggregationType(
7373
instrument_selector->GetInstrumentType(), is_monotonic);
7474
}

sdk/test/configuration/yaml_distribution_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ file_format: "1.0-distribution"
6767
auto *distribution = config->distribution.get();
6868
ASSERT_NE(distribution, nullptr);
6969
ASSERT_EQ(distribution->entries.size(), 2);
70-
opentelemetry::sdk::configuration::DocumentNode *node;
70+
opentelemetry::sdk::configuration::DocumentNode *node{nullptr};
7171
std::unique_ptr<opentelemetry::sdk::configuration::DocumentNode> property;
7272
std::string name;
7373

0 commit comments

Comments
 (0)