From 76852be59cbfdb22901b37bb8579d19c07af7037 Mon Sep 17 00:00:00 2001 From: tsepez Date: Fri, 20 May 2016 16:09:37 -0700 Subject: Fix /analyze warnings in fxbarcode/ Part of the fix to the issues in bug 613623. These are all real bugs arising from non-use of L""-style literals band-aided over with casts. Remove the casts, and fix the literals or replace with empty string constructors. BUG=613623, 427616 Review-Url: https://codereview.chromium.org/1999933002 --- xfa/fxbarcode/datamatrix/BC_ErrorCorrection.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'xfa/fxbarcode/datamatrix/BC_ErrorCorrection.cpp') diff --git a/xfa/fxbarcode/datamatrix/BC_ErrorCorrection.cpp b/xfa/fxbarcode/datamatrix/BC_ErrorCorrection.cpp index 8f54353d4a..f52f0ff0c4 100644 --- a/xfa/fxbarcode/datamatrix/BC_ErrorCorrection.cpp +++ b/xfa/fxbarcode/datamatrix/BC_ErrorCorrection.cpp @@ -121,7 +121,7 @@ CFX_WideString CBC_ErrorCorrection::encodeECC200(CFX_WideString codewords, int32_t& e) { if (codewords.GetLength() != symbolInfo->m_dataCapacity) { e = BCExceptionIllegalArgument; - return (FX_WCHAR*)""; + return CFX_WideString(); } CFX_WideString sb; sb += codewords; @@ -129,7 +129,7 @@ CFX_WideString CBC_ErrorCorrection::encodeECC200(CFX_WideString codewords, if (blockCount == 1) { CFX_WideString ecc = createECCBlock(codewords, symbolInfo->m_errorCodewords, e); - BC_EXCEPTION_CHECK_ReturnValue(e, (FX_WCHAR*)""); + BC_EXCEPTION_CHECK_ReturnValue(e, CFX_WideString()); sb += ecc; } else { CFX_Int32Array dataSizes; @@ -152,7 +152,7 @@ CFX_WideString CBC_ErrorCorrection::encodeECC200(CFX_WideString codewords, temp += (FX_WCHAR)codewords.GetAt(d); } CFX_WideString ecc = createECCBlock(temp, errorSizes[block], e); - BC_EXCEPTION_CHECK_ReturnValue(e, (FX_WCHAR*)""); + BC_EXCEPTION_CHECK_ReturnValue(e, CFX_WideString()); int32_t pos = 0; for (int32_t l = block; l < errorSizes[block] * blockCount; l += blockCount) { @@ -179,7 +179,7 @@ CFX_WideString CBC_ErrorCorrection::createECCBlock(CFX_WideString codewords, if (table >= kFactorTableNum) { e = BCExceptionIllegalArgument; - return (FX_WCHAR*)""; + return CFX_WideString(); } uint16_t* ecc = FX_Alloc(uint16_t, numECWords); FXSYS_memset(ecc, 0, numECWords * sizeof(uint16_t)); -- cgit v1.2.3