diff options
author | thestig@chromium.org <thestig@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2011-10-20 18:23:01 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2011-10-20 18:23:01 +0000 |
commit | 11582abc270028b448a49ab97459bfacd958dd2a (patch) | |
tree | 68df807c1613a5f8a159c53512c8fac9389ac3a6 /src/processor | |
parent | Correct incorrect bounds checking. (diff) | |
download | breakpad-11582abc270028b448a49ab97459bfacd958dd2a.tar.xz |
Fix some shadow variables, including one in file_id.cc that causes all files to generate the same hash. Add a test to make sure this doesn't happen again.
Review URL: http://breakpad.appspot.com/316002
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@875 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/processor')
-rw-r--r-- | src/processor/source_line_resolver_base.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/processor/source_line_resolver_base.cc b/src/processor/source_line_resolver_base.cc index b8362dcf..49088c89 100644 --- a/src/processor/source_line_resolver_base.cc +++ b/src/processor/source_line_resolver_base.cc @@ -88,7 +88,7 @@ bool SourceLineResolverBase::ReadSymbolFile(char **symbol_data, int error_code = stat(map_file.c_str(), &buf); if (error_code == -1) { string error_string; - int error_code = ErrnoString(&error_string); + error_code = ErrnoString(&error_string); BPLOG(ERROR) << "Could not open " << map_file << ", error " << error_code << ": " << error_string; return false; @@ -110,7 +110,7 @@ bool SourceLineResolverBase::ReadSymbolFile(char **symbol_data, FILE *f = fopen(map_file.c_str(), "rt"); if (!f) { string error_string; - int error_code = ErrnoString(&error_string); + error_code = ErrnoString(&error_string); BPLOG(ERROR) << "Could not open " << map_file << ", error " << error_code << ": " << error_string; delete [] (*symbol_data); @@ -126,7 +126,7 @@ bool SourceLineResolverBase::ReadSymbolFile(char **symbol_data, if (items_read != file_size) { string error_string; - int error_code = ErrnoString(&error_string); + error_code = ErrnoString(&error_string); BPLOG(ERROR) << "Could not slurp " << map_file << ", error " << error_code << ": " << error_string; delete [] (*symbol_data); @@ -240,11 +240,11 @@ void SourceLineResolverBase::UnloadModule(const CodeModule *code_module) { if (!code_module) return; - ModuleMap::iterator iter = modules_->find(code_module->code_file()); - if (iter != modules_->end()) { - Module *symbol_module = iter->second; + ModuleMap::iterator mod_iter = modules_->find(code_module->code_file()); + if (mod_iter != modules_->end()) { + Module *symbol_module = mod_iter->second; delete symbol_module; - modules_->erase(iter); + modules_->erase(mod_iter); } if (ShouldDeleteMemoryBufferAfterLoadModule()) { |