summaryrefslogtreecommitdiff
path: root/fxbarcode/qrcode
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2018-06-04 21:15:57 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-04 21:15:57 +0000
commit82df54058ae56edef579d75421f216351bfd723e (patch)
tree3fddbe37e8cca9422ca43a1108a9c334f0d3bb7e /fxbarcode/qrcode
parentd6c6a9f36666c290922efd59ba37bdfc3667eca4 (diff)
downloadpdfium-82df54058ae56edef579d75421f216351bfd723e.tar.xz
Fix a number of unused writes in barcode code
This fixes a number of instances where a value is written out to a variable, but never used in the barcode. There are three different types of fixes employed in this CL. If the non-use is a bug, then rewrite the code to actually use the value. If it is an assignment with no side effects, then just remove the entire line. Finally if it is an assignment of a function return value, cast it to void instead to clearly mark that the return is being ignored. Issues found with Clang Static Analyzer. Change-Id: If13a3684cb2db81592cce9a798788a26fcdb4c6d Reviewed-on: https://pdfium-review.googlesource.com/33771 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'fxbarcode/qrcode')
-rw-r--r--fxbarcode/qrcode/BC_QRCoderEncoder.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/fxbarcode/qrcode/BC_QRCoderEncoder.cpp b/fxbarcode/qrcode/BC_QRCoderEncoder.cpp
index a44dfc39f6..8da2d48e34 100644
--- a/fxbarcode/qrcode/BC_QRCoderEncoder.cpp
+++ b/fxbarcode/qrcode/BC_QRCoderEncoder.cpp
@@ -479,7 +479,6 @@ void SplitString(const ByteString& content,
result->push_back(
{CBC_QRCoderMode::sALPHANUMERIC, content.Mid(flag, index - flag)});
}
- flag = index;
if (index < content.GetLength())
SplitString(content.Right(content.GetLength() - index), result);
}