From 29b0d713c9a62ede55d2e2f40e2e81a71788da1c Mon Sep 17 00:00:00 2001 From: "mark@chromium.org" Date: Tue, 11 Oct 2011 17:38:35 +0000 Subject: 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 --- src/common/dwarf_cfi_to_module.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common/dwarf_cfi_to_module.cc') 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); -- cgit v1.2.1