Skip to content

Commit

Permalink
fix compiler warnings (#1499)
Browse files Browse the repository at this point in the history
* fix compiler warnings

* format
  • Loading branch information
esigo authored Jul 17, 2022
1 parent e708de5 commit fba16c6
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class AttributesProcessor
// @returns The processed attributes
virtual MetricAttributes process(
const opentelemetry::common::KeyValueIterable &attributes) const noexcept = 0;
virtual ~AttributesProcessor() = default;
};

/**
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/metrics/metric_reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace metrics
{

MetricReader::MetricReader(AggregationTemporality aggregation_temporality)
: aggregation_temporality_(aggregation_temporality), shutdown_(false), metric_producer_(nullptr)
: metric_producer_(nullptr), aggregation_temporality_(aggregation_temporality), shutdown_(false)
{}

void MetricReader::SetMetricProducer(MetricProducer *metric_producer)
Expand Down
1 change: 0 additions & 1 deletion sdk/src/metrics/state/sync_metric_storage.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ bool SyncMetricStorage::Collect(CollectorHandle *collector,
nostd::function_ref<bool(MetricData)> callback) noexcept
{
opentelemetry::common::SystemTimestamp last_collection_ts = sdk_start_ts;
auto aggregation_temporarily = collector->GetAggregationTemporality();

// Add the current delta metrics to `unreported metrics stash` for all the collectors,
// this will also empty the delta metrics hashmap, and make it available for
Expand Down
2 changes: 0 additions & 2 deletions sdk/test/metrics/async_metric_storage_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,7 @@ TEST_P(WritableMetricStorageTestFixture, TestAggregation)
std::vector<std::shared_ptr<CollectorHandle>> collectors;
collectors.push_back(collector);
size_t count_attributes = 0;
long value = 0;

MeasurementFetcher measurement_fetcher;
opentelemetry::sdk::metrics::AsyncMetricStorage<long> storage(instr_desc, AggregationType::kSum,
MeasurementFetcher::Fetcher,
new DefaultAttributesProcessor());
Expand Down

0 comments on commit fba16c6

Please sign in to comment.