From bd86f24ed091f4231e511a252fce09cbfeb72bb7 Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Fri, 1 Jun 2018 16:01:13 +0000 Subject: Remove initialization of wchar_t ch This value is overwritten at the beginning of the following while loop, so the initialized value is never used and the method called is const, so should be side effect free. Issue found with Clang Static Analyzer. Change-Id: I77f27daccd3aa1edd434cfa3e0dd7bc095db06d0 Reviewed-on: https://pdfium-review.googlesource.com/33550 Reviewed-by: Henrique Nakashima Commit-Queue: Ryan Harrison --- xfa/fde/cfde_texteditengine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xfa/fde/cfde_texteditengine.cpp b/xfa/fde/cfde_texteditengine.cpp index cfe844e656..6c1e8dcc6c 100644 --- a/xfa/fde/cfde_texteditengine.cpp +++ b/xfa/fde/cfde_texteditengine.cpp @@ -439,7 +439,7 @@ size_t CFDE_TextEditEngine::GetIndexLeft(size_t pos) const { return 0; --pos; - wchar_t ch = GetChar(pos); + wchar_t ch; while (pos != 0) { // We want to be on the location just before the \r or \n ch = GetChar(pos - 1); -- cgit v1.2.3