summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2018-08-23 20:58:14 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-23 20:58:14 +0000
commit203339a2aa88bb31576233220d7ced73920a596f (patch)
tree895fc5fcc07107c8cc6f81b9c6e0f12faef9fc1e /core/fpdfapi/parser
parent3b45012d57884b06915eb5a1f54fbba04a45e807 (diff)
downloadpdfium-203339a2aa88bb31576233220d7ced73920a596f.tar.xz
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 <rharrison@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'core/fpdfapi/parser')
-rw-r--r--core/fpdfapi/parser/cpdf_syntax_parser.cpp14
1 files changed, 7 insertions, 7 deletions
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_Object> CPDF_SyntaxParser::GetObjectBodyInternal(
std::unique_ptr<CPDF_Dictionary> pDict =
pdfium::MakeUnique<CPDF_Dictionary>(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;