From b46ce4172ee8282a39997c175dff2bd8f187208f Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Fri, 7 Jul 2017 23:15:35 +0200 Subject: core: fix -Wshadow warnings 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 Commit-Queue: Lei Zhang --- core/fxcrt/fx_system_unittest.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'core/fxcrt') diff --git a/core/fxcrt/fx_system_unittest.cpp b/core/fxcrt/fx_system_unittest.cpp index 7747086b1b..da616b4ee6 100644 --- a/core/fxcrt/fx_system_unittest.cpp +++ b/core/fxcrt/fx_system_unittest.cpp @@ -184,8 +184,9 @@ TEST(fxcrt, FXSYS_wcsftime) { for (int year = -2500; year <= 2500; ++year) { year_time.tm_year = year; - wchar_t buf[100] = {}; - FXSYS_wcsftime(buf, FX_ArraySize(buf), L"%Y-%m-%dT%H:%M:%S", &year_time); + wchar_t year_buf[100] = {}; + FXSYS_wcsftime(year_buf, FX_ArraySize(year_buf), L"%Y-%m-%dT%H:%M:%S", + &year_time); } // Ensure wcsftime handles bad years, etc. without crashing. -- cgit v1.2.3