From 11582abc270028b448a49ab97459bfacd958dd2a Mon Sep 17 00:00:00 2001 From: "thestig@chromium.org" Date: Thu, 20 Oct 2011 18:23:01 +0000 Subject: 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 --- src/common/stabs_reader.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/common/stabs_reader.cc') 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; -- cgit v1.2.1