Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/include/opentelemetry/baggage/baggage.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class OPENTELEMETRY_EXPORT Baggage
}

nostd::shared_ptr<Baggage> baggage(new Baggage(cnt));
bool kv_valid;
bool kv_valid{false};
nostd::string_view key, value;

while (kv_str_tokenizer.next(kv_valid, key, value) && baggage->kv_properties_->Size() < cnt)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class HttpTraceContext : public context::propagation::TextMapPropagator

static TraceFlags TraceFlagsFromHex(nostd::string_view trace_flags)
{
uint8_t flags;
uint8_t flags{0};
detail::HexToBinary(trace_flags, &flags, sizeof(flags));
return TraceFlags(flags);
}
Expand Down Expand Up @@ -140,7 +140,7 @@ class HttpTraceContext : public context::propagation::TextMapPropagator
}

// hex is valid, convert it to binary
uint8_t version_binary;
uint8_t version_binary{kInvalidVersion};
detail::HexToBinary(version_hex, &version_binary, sizeof(version_binary));
if (version_binary == kInvalidVersion)
{
Expand Down
2 changes: 1 addition & 1 deletion api/include/opentelemetry/trace/propagation/jaeger.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class JaegerPropagator : public context::propagation::TextMapPropagator
return SpanContext::GetInvalid();
}

uint8_t flags;
uint8_t flags{0};
if (!detail::HexToBinary(flags_hex, &flags, sizeof(flags)))
{
return SpanContext::GetInvalid();
Expand Down
2 changes: 1 addition & 1 deletion api/include/opentelemetry/trace/trace_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class OPENTELEMETRY_EXPORT TraceState
}

nostd::shared_ptr<TraceState> ts(new TraceState(cnt));
bool kv_valid;
bool kv_valid{false};
nostd::string_view key, value;
while (kv_str_tokenizer.next(kv_valid, key, value) && ts->kv_properties_->Size() < cnt)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class ViewRegistry

if (aggregation_type == AggregationType::kDefault)
{
bool is_monotonic;
bool is_monotonic{false};
aggregation_type = DefaultAggregation::GetDefaultAggregationType(
instrument_selector->GetInstrumentType(), is_monotonic);
}
Expand Down
2 changes: 1 addition & 1 deletion sdk/test/configuration/yaml_distribution_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ file_format: "1.0-distribution"
auto *distribution = config->distribution.get();
ASSERT_NE(distribution, nullptr);
ASSERT_EQ(distribution->entries.size(), 2);
opentelemetry::sdk::configuration::DocumentNode *node;
opentelemetry::sdk::configuration::DocumentNode *node{nullptr};
std::unique_ptr<opentelemetry::sdk::configuration::DocumentNode> property;
std::string name;

Expand Down
Loading