summaryrefslogtreecommitdiff
path: root/core/fpdfapi
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-07-07 23:15:35 +0200
committerChromium commit bot <commit-bot@chromium.org>2017-07-07 23:09:55 +0000
commitb46ce4172ee8282a39997c175dff2bd8f187208f (patch)
tree659660761ab1b8d7d03b0e14358f95808bec9541 /core/fpdfapi
parentf6f68c75ce54a5865fb19dcb075e7734f1639663 (diff)
downloadpdfium-b46ce4172ee8282a39997c175dff2bd8f187208f.tar.xz
core: fix -Wshadow warningschromium/3153
Found with this patch: diff --git a/BUILD.gn b/BUILD.gn index 83bad1b13..444685f04 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -89,6 +89,8 @@ config("pdfium_core_config") { "/wd4324", "/wd4577", ] + } else { + cflags += [ "-Wshadow" ] } } But renaming the conflicting names is tricky, so done with clang-rename. Change-Id: Ie959b86e9e82b11b211761b0c73e439e51044de7 Reviewed-on: https://pdfium-review.googlesource.com/7410 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi')
-rw-r--r--core/fpdfapi/parser/cpdf_syntax_parser.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/fpdfapi/parser/cpdf_syntax_parser.cpp b/core/fpdfapi/parser/cpdf_syntax_parser.cpp
index 9dccbd936e..ce5a83579d 100644
--- a/core/fpdfapi/parser/cpdf_syntax_parser.cpp
+++ b/core/fpdfapi/parser/cpdf_syntax_parser.cpp
@@ -387,10 +387,10 @@ std::unique_ptr<CPDF_Object> CPDF_SyntaxParser::GetObject(
if (bIsNumber) {
CFX_ByteString nextword2 = GetNextWord(nullptr);
if (nextword2 == "R") {
- uint32_t objnum = FXSYS_atoui(word.c_str());
- if (objnum == CPDF_Object::kInvalidObjNum)
+ uint32_t refnum = FXSYS_atoui(word.c_str());
+ if (refnum == CPDF_Object::kInvalidObjNum)
return nullptr;
- return pdfium::MakeUnique<CPDF_Reference>(pObjList, objnum);
+ return pdfium::MakeUnique<CPDF_Reference>(pObjList, refnum);
}
}
m_Pos = SavedPos;
@@ -508,10 +508,10 @@ std::unique_ptr<CPDF_Object> CPDF_SyntaxParser::GetObjectForStrict(
if (bIsNumber) {
CFX_ByteString nextword2 = GetNextWord(nullptr);
if (nextword2 == "R") {
- uint32_t objnum = FXSYS_atoui(word.c_str());
- if (objnum == CPDF_Object::kInvalidObjNum)
+ uint32_t refnum = FXSYS_atoui(word.c_str());
+ if (refnum == CPDF_Object::kInvalidObjNum)
return nullptr;
- return pdfium::MakeUnique<CPDF_Reference>(pObjList, objnum);
+ return pdfium::MakeUnique<CPDF_Reference>(pObjList, refnum);
}
}
m_Pos = SavedPos;