From 203339a2aa88bb31576233220d7ced73920a596f Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Thu, 23 Aug 2018 20:58:14 +0000 Subject: Fix shadowed variables This CL fixes instances of variable shadowing that are discovered by turning on -Wshadow. BUG=pdfium:1137 Change-Id: I418d50de89ecbeb12e85b23a358bc61e8f16e888 Reviewed-on: https://pdfium-review.googlesource.com/41150 Commit-Queue: Ryan Harrison Reviewed-by: Tom Sepez Reviewed-by: Henrique Nakashima --- core/fpdfapi/parser/cpdf_syntax_parser.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'core/fpdfapi/parser') diff --git a/core/fpdfapi/parser/cpdf_syntax_parser.cpp b/core/fpdfapi/parser/cpdf_syntax_parser.cpp index 3acad525f7..89bf991cd4 100644 --- a/core/fpdfapi/parser/cpdf_syntax_parser.cpp +++ b/core/fpdfapi/parser/cpdf_syntax_parser.cpp @@ -477,22 +477,22 @@ std::unique_ptr CPDF_SyntaxParser::GetObjectBodyInternal( std::unique_ptr pDict = pdfium::MakeUnique(m_pPool); while (1) { - ByteString word = GetNextWord(nullptr); - if (word.IsEmpty()) + ByteString inner_word = GetNextWord(nullptr); + if (inner_word.IsEmpty()) return nullptr; - FX_FILESIZE SavedPos = m_Pos - word.GetLength(); - if (word == ">>") + FX_FILESIZE SavedPos = m_Pos - inner_word.GetLength(); + if (inner_word == ">>") break; - if (word == "endobj") { + if (inner_word == "endobj") { m_Pos = SavedPos; break; } - if (word[0] != '/') + if (inner_word[0] != '/') continue; - ByteString key = PDF_NameDecode(word.AsStringView()); + ByteString key = PDF_NameDecode(inner_word.AsStringView()); if (key.IsEmpty() && parse_type == ParseType::kLoose) continue; -- cgit v1.2.3