Skip to content

Commit

Permalink
Merge "Fix use after move" into main
Browse files Browse the repository at this point in the history
  • Loading branch information
carlscabgro authored and Gerrit Code Review committed Sep 9, 2024
2 parents 1898fc7 + c18035d commit 9c4badd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/trace_processor/importers/perf/perf_data_tokenizer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,8 @@ PerfDataTokenizer::ParseRecords() {
!res.ok() || *res != ParsingResult::kSuccess) {
return res;
}

switch (record.header.type) {
const uint32_t type = record.header.type;
switch (type) {
case PERF_RECORD_AUXTRACE:
PERFETTO_CHECK(!current_auxtrace_.has_value());
current_auxtrace_.emplace();
Expand All @@ -279,8 +279,8 @@ PerfDataTokenizer::ParseRecords() {

default:
if (!PushRecord(std::move(record)).ok()) {
context_->storage->IncrementIndexedStats(
stats::perf_record_skipped, static_cast<int>(record.header.type));
context_->storage->IncrementIndexedStats(stats::perf_record_skipped,
static_cast<int>(type));
}
break;
}
Expand Down

0 comments on commit 9c4badd

Please sign in to comment.