diff options
author | mark@chromium.org <mark@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2011-10-11 17:38:35 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2011-10-11 17:38:35 +0000 |
commit | 29b0d713c9a62ede55d2e2f40e2e81a71788da1c (patch) | |
tree | aaca35163a78b4239c00d1ed4f1fe7a36b636a4f | |
parent | Fix harmless printf abuse in symupload. (diff) | |
download | breakpad-29b0d713c9a62ede55d2e2f40e2e81a71788da1c.tar.xz |
Fix harmless warning in dwarf_cfi_to_module.cc.
This function already establishes that (signed) i must be positive by the time
it assigns it to (unsigned) reg. Because reg is unsigned, it is impossible for
it to be negative. Because i was already checked for positivity, this check
can be removed entirely. It was not a miswritten check that intended to check
i instead of reg, because i is already checked.
This addresses the following warning:
dwarf_cfi_to_module.cc:135:9: warning: comparison of 0 <= unsigned expression is always true [-Wtautological-compare]
Committed r859
Review URL: http://breakpad.appspot.com/310003
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@861 4c0a9323-5329-0410-9bdc-e9ce6186880e
-rw-r--r-- | src/common/dwarf_cfi_to_module.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/dwarf_cfi_to_module.cc b/src/common/dwarf_cfi_to_module.cc index ed0b406d..9aeb8ed2 100644 --- a/src/common/dwarf_cfi_to_module.cc +++ b/src/common/dwarf_cfi_to_module.cc @@ -132,7 +132,7 @@ string DwarfCFIToModule::RegisterName(int i) { if (reg == return_address_) return ra_name_; - if (0 <= reg && reg < register_names_.size()) + if (reg < register_names_.size()) return register_names_[reg]; reporter_->UnnamedRegister(entry_offset_, reg); |