summaryrefslogtreecommitdiff
path: root/xfa/fde/cfde_texteditengine.cpp
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2018-06-01 16:01:13 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-01 16:01:13 +0000
commitbd86f24ed091f4231e511a252fce09cbfeb72bb7 (patch)
tree1d55851da48a85dae0902f94cbe5ba3361c07919 /xfa/fde/cfde_texteditengine.cpp
parent1c2eea295db24fdebcfb9de4d3d6f0e8a02adee4 (diff)
downloadpdfium-bd86f24ed091f4231e511a252fce09cbfeb72bb7.tar.xz
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 <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'xfa/fde/cfde_texteditengine.cpp')
-rw-r--r--xfa/fde/cfde_texteditengine.cpp2
1 files changed, 1 insertions, 1 deletions
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);