From 53cb8044fde30128b761bf20a86149a1a3487882 Mon Sep 17 00:00:00 2001 From: "jimblandy@gmail.com" Date: Mon, 27 Jul 2009 21:30:56 +0000 Subject: The 'no_next_addr_count' variable in ComputeSizeAndRVA shouldn't be static. The current arrangement would produce needless warnings if WriteSymbolFile were ever used twice in the same program invocation. Even if it weren't wrong, it's unnecessary, and local non-const static variables require extra care when reading to be sure of their effect. A=jimblandy R=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@363 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/common/linux/dump_symbols.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common/linux/dump_symbols.cc') diff --git a/src/common/linux/dump_symbols.cc b/src/common/linux/dump_symbols.cc index 7f7cf608..a5533f17 100644 --- a/src/common/linux/dump_symbols.cc +++ b/src/common/linux/dump_symbols.cc @@ -444,6 +444,7 @@ static void AddIncludedFiles(struct SymbolInfo *symbols, // Compute size and rva information based on symbols loaded from stab section. static bool ComputeSizeAndRVA(ElfW(Addr) loading_addr, struct SymbolInfo *symbols) { + int no_next_addr_count = 0; std::vector sorted_files = SortByAddress(&(symbols->source_file_info)); for (size_t i = 0; i < sorted_files.size(); ++i) { @@ -476,7 +477,6 @@ static bool ComputeSizeAndRVA(ElfW(Addr) loading_addr, // } // TODO(liuli): Find a better solution. static const int kDefaultSize = 0x10000000; - static int no_next_addr_count = 0; if (next_addr != 0) { func_info.size = next_addr - func_info.addr; } else { -- cgit v1.2.1