From e76e823401817703d67a5a71817f407400fceb0e Mon Sep 17 00:00:00 2001 From: Bo Xu Date: Wed, 16 Jul 2014 16:31:29 -0700 Subject: Remove unused variable orig_size. Original patch by Andrey Khalyavin BUG=N/A R=bo_xu@foxitsoftware.com Review URL: https://codereview.chromium.org/384143002 --- core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp index 5854d71344..f6daf40b8b 100644 --- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp +++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp @@ -16,7 +16,6 @@ FX_DWORD _A85Decode(const FX_BYTE* src_buf, FX_DWORD src_size, FX_LPBYTE& dest_b if (src_size == 0) { return 0; } - FX_DWORD orig_size = dest_size; FX_DWORD zcount = 0; FX_DWORD pos = 0; while (pos < src_size) { @@ -88,7 +87,6 @@ FX_DWORD _A85Decode(const FX_BYTE* src_buf, FX_DWORD src_size, FX_LPBYTE& dest_b } FX_DWORD _HexDecode(const FX_BYTE* src_buf, FX_DWORD src_size, FX_LPBYTE& dest_buf, FX_DWORD& dest_size) { - FX_DWORD orig_size = dest_size; FX_DWORD i; for (i = 0; i < src_size; i ++) if (src_buf[i] == '>') { @@ -129,7 +127,6 @@ FX_DWORD _HexDecode(const FX_BYTE* src_buf, FX_DWORD src_size, FX_LPBYTE& dest_b } FX_DWORD RunLengthDecode(const FX_BYTE* src_buf, FX_DWORD src_size, FX_LPBYTE& dest_buf, FX_DWORD& dest_size) { - FX_DWORD orig_size = dest_size; FX_DWORD i = 0; FX_DWORD old; dest_size = 0; @@ -468,8 +465,8 @@ CFX_ByteString PDF_EncodeText(FX_LPCWSTR pString, int len, CFX_CharMap* pCharMap return result; } } - - if(len > INT_MAX/2-1) + + if(len > INT_MAX/2-1) { result.ReleaseBuffer(0); return result; -- cgit v1.2.3