diff options
author | mmentovai@google.com <mmentovai@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-20 03:25:47 +0000 |
---|---|---|
committer | mmentovai@google.com <mmentovai@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-20 03:25:47 +0000 |
commit | 95c796ba9eebf3016b34d28f32e241a88df67a56 (patch) | |
tree | fdb0cf4d9cec63bb942746a18ed68d784d4677eb /base/tracked_objects.cc | |
parent | 3816f46725f7b8e42e352a063efd5206a46dbe9a (diff) | |
download | chromium_src-95c796ba9eebf3016b34d28f32e241a88df67a56.zip chromium_src-95c796ba9eebf3016b34d28f32e241a88df67a56.tar.gz chromium_src-95c796ba9eebf3016b34d28f32e241a88df67a56.tar.bz2 |
Fix a few warnings in the tracked object comparator
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1081 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/tracked_objects.cc')
-rw-r--r-- | base/tracked_objects.cc | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/base/tracked_objects.cc b/base/tracked_objects.cc index f94d77b..b683a87 100644 --- a/base/tracked_objects.cc +++ b/base/tracked_objects.cc @@ -184,7 +184,7 @@ void ThreadData::WriteHTML(const std::string& query, std::string* output) { // Create filtering and sort comparison object. Comparator comparator; - bool display_details = comparator.ParseQuery(escaped_query); + comparator.ParseQuery(escaped_query); // Filter out acceptable (matching) instances. DataCollector::Collection match_array; @@ -696,6 +696,9 @@ bool Comparator::operator()(const Snapshot& left, if (left.AverageMsDuration() != right.AverageMsDuration()) return left.AverageMsDuration() > right.AverageMsDuration(); break; + + default: + break; } if (tiebreaker_) return tiebreaker_->operator()(left, right); @@ -703,7 +706,7 @@ bool Comparator::operator()(const Snapshot& left, } bool Comparator::Equivalent(const Snapshot& left, - const Snapshot& right) const { + const Snapshot& right) const { switch (selector_) { case BIRTH_THREAD: if (left.birth_thread() != right.birth_thread() && @@ -714,8 +717,7 @@ bool Comparator::Equivalent(const Snapshot& left, case DEATH_THREAD: if (left.death_thread() != right.death_thread() && - left.DeathThreadName() != - right.DeathThreadName()) + left.DeathThreadName() != right.DeathThreadName()) return false; break; @@ -746,6 +748,9 @@ bool Comparator::Equivalent(const Snapshot& left, if (left.life_duration() != right.life_duration()) return false; break; + + default: + break; } if (tiebreaker_ && !use_tiebreaker_for_sort_only_) return tiebreaker_->Equivalent(left, right); @@ -766,14 +771,17 @@ bool Comparator::Acceptable(const Snapshot& sample) const { return false; break; - case BIRTH_FILE: + case BIRTH_FILE: if (!strstr(sample.location().file_name(), required_.c_str())) - return false; + return false; break; - case BIRTH_FUNCTION: + case BIRTH_FUNCTION: if (!strstr(sample.location().function_name(), required_.c_str())) - return false; + return false; + break; + + default: break; } } @@ -871,9 +879,6 @@ bool Comparator::WriteSortGrouping(const Snapshot& sample, std::string* output) const { bool wrote_data = false; switch (selector_) { - case NIL: - break; - case BIRTH_THREAD: StringAppendF(output, "All new on %s ", sample.birth_thread()->ThreadName().c_str()); @@ -899,6 +904,9 @@ bool Comparator::WriteSortGrouping(const Snapshot& sample, sample.location().WriteFunctionName(output); output->push_back(' '); break; + + default: + break; } if (tiebreaker_ && !use_tiebreaker_for_sort_only_) { wrote_data |= tiebreaker_->WriteSortGrouping(sample, output); |