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/common/stabs_reader.cc | |
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/common/stabs_reader.cc')
-rw-r--r-- | src/common/stabs_reader.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/common/stabs_reader.cc b/src/common/stabs_reader.cc index 7dd2eecd..4897361e 100644 --- a/src/common/stabs_reader.cc +++ b/src/common/stabs_reader.cc @@ -130,7 +130,7 @@ bool StabsReader::ProcessCompilationUnit() { // There may be an N_SO entry whose name ends with a slash, // indicating the directory in which the compilation occurred. // The build directory defaults to NULL. - const char *build_directory = NULL; + const char *build_directory = NULL; { const char *name = SymbolString(); if (name[0] && name[strlen(name) - 1] == '/') { @@ -138,7 +138,7 @@ bool StabsReader::ProcessCompilationUnit() { ++iterator_; } } - + // We expect to see an N_SO entry with a filename next, indicating // the start of the compilation unit. { @@ -212,7 +212,7 @@ bool StabsReader::ProcessCompilationUnit() { queued_lines_.clear(); return true; -} +} bool StabsReader::ProcessFunction() { assert(!iterator_->at_end && iterator_->type == N_FUN); @@ -237,7 +237,7 @@ bool StabsReader::ProcessFunction() { return false; } queued_lines_.clear(); - + while (!iterator_->at_end) { if (iterator_->type == N_SO || iterator_->type == N_FUN) break; @@ -266,8 +266,8 @@ bool StabsReader::ProcessFunction() { if (!iterator_->at_end) { assert(iterator_->type == N_SO || iterator_->type == N_FUN); if (iterator_->type == N_FUN) { - const char *name = SymbolString(); - if (name[0] == '\0') { + const char *symbol_name = SymbolString(); + if (symbol_name[0] == '\0') { // An N_FUN entry with no name is a terminator for this function; // its value is the function's size. ending_address = function_address + iterator_->value; |