From 4a8eeb74d38a1589c21ec06b68262d7795dd8f71 Mon Sep 17 00:00:00 2001 From: Jun Fang Date: Tue, 3 Nov 2015 19:01:30 -0800 Subject: Remove unused variables BUG=pdfium:261 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1413343003 . --- xfa/src/fxfa/src/app/xfa_ffdocview.cpp | 2 -- xfa/src/fxfa/src/app/xfa_fffield.cpp | 1 - xfa/src/fxfa/src/app/xfa_fftextedit.cpp | 1 - xfa/src/fxfa/src/app/xfa_ffwidget.cpp | 3 +-- xfa/src/fxfa/src/app/xfa_ffwidgetacc.cpp | 1 - xfa/src/fxfa/src/app/xfa_ffwidgethandler.cpp | 13 +++++-------- xfa/src/fxfa/src/app/xfa_textlayout.cpp | 2 +- xfa/src/fxfa/src/common/xfa_utils.h | 1 - xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.cpp | 20 ++------------------ .../fxfa/src/parser/xfa_document_datamerger_imp.cpp | 5 ++--- xfa/src/fxfa/src/parser/xfa_layout_itemlayout.cpp | 3 --- xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.cpp | 6 ------ xfa/src/fxfa/src/parser/xfa_object_imp.cpp | 11 +++-------- xfa/src/fxfa/src/parser/xfa_objectacc_imp.cpp | 2 -- xfa/src/fxfa/src/parser/xfa_parser_imp.cpp | 5 +---- .../fxfa/src/parser/xfa_script_hostpseudomodel.cpp | 1 - .../fxfa/src/parser/xfa_script_layoutpseudomodel.cpp | 1 - .../fxfa/src/parser/xfa_script_resolveprocessor.cpp | 4 ---- xfa/src/fxfa/src/parser/xfa_utils_imp.cpp | 1 - 19 files changed, 15 insertions(+), 68 deletions(-) (limited to 'xfa/src/fxfa') diff --git a/xfa/src/fxfa/src/app/xfa_ffdocview.cpp b/xfa/src/fxfa/src/app/xfa_ffdocview.cpp index 1b3432a6cc..8f9265a54d 100644 --- a/xfa/src/fxfa/src/app/xfa_ffdocview.cpp +++ b/xfa/src/fxfa/src/app/xfa_ffdocview.cpp @@ -792,8 +792,6 @@ void CXFA_FFDocView::RunBindItems() { CFX_WideString wsValue, wsLabel; FX_DWORD uValueHash = FX_HashCode_String_GetW(CFX_WideString(wsValueRef), wsValueRef.GetLength()); - FX_DWORD uLableHash = FX_HashCode_String_GetW(CFX_WideString(wsLabelRef), - wsLabelRef.GetLength()); for (int32_t i = 0; i < iCount; i++) { CXFA_Object* refObj = rs.nodes[i]; if (!refObj->IsNode()) { diff --git a/xfa/src/fxfa/src/app/xfa_fffield.cpp b/xfa/src/fxfa/src/app/xfa_fffield.cpp index 80d65062a0..6e588b44c6 100644 --- a/xfa/src/fxfa/src/app/xfa_fffield.cpp +++ b/xfa/src/fxfa/src/app/xfa_fffield.cpp @@ -709,7 +709,6 @@ int32_t CXFA_FFField::CalculateOverride() { if (!pAcc) { return CalculateWidgetAcc(m_pDataAcc); } - int32_t iOverride = 0; if (CalculateWidgetAcc(pAcc) == 0) { return 0; } diff --git a/xfa/src/fxfa/src/app/xfa_fftextedit.cpp b/xfa/src/fxfa/src/app/xfa_fftextedit.cpp index 60cb342b34..ce43ce0481 100644 --- a/xfa/src/fxfa/src/app/xfa_fftextedit.cpp +++ b/xfa/src/fxfa/src/app/xfa_fftextedit.cpp @@ -409,7 +409,6 @@ FWL_ERR CXFA_FFTextEdit::OnProcessEvent(CFWL_Event* pEvent) { } case FWL_EVTHASH_EDT_CheckWord: { CFX_WideString wstr(L"FWL_EVENT_DTP_SelectChanged"); - FX_DWORD hashcode = FX_HashCode_String_GetW(wstr, wstr.GetLength()); CFWL_EvtEdtCheckWord* event = (CFWL_EvtEdtCheckWord*)pEvent; event->bCheckWord = CheckWord(event->bsWord); break; diff --git a/xfa/src/fxfa/src/app/xfa_ffwidget.cpp b/xfa/src/fxfa/src/app/xfa_ffwidget.cpp index ed35d3e0ba..cba6a7c459 100644 --- a/xfa/src/fxfa/src/app/xfa_ffwidget.cpp +++ b/xfa/src/fxfa/src/app/xfa_ffwidget.cpp @@ -1053,8 +1053,7 @@ CFX_DIBitmap* XFA_LoadImageFromBuffer(IFX_FileRead* pImageFileRead, CFX_DIBitmap* pBitmap = NULL; ICodec_ProgressiveDecoder* pProgressiveDecoder = pCodecMgr->CreateProgressiveDecoder(); - FXCODEC_STATUS status = - pProgressiveDecoder->LoadImageInfo(pImageFileRead, type, &dibAttr); + pProgressiveDecoder->LoadImageInfo(pImageFileRead, type, &dibAttr); switch (dibAttr.m_wDPIUnit) { case FXCODEC_RESUNIT_CENTIMETER: dibAttr.m_nXDPI = (int32_t)(dibAttr.m_nXDPI * 2.54f); diff --git a/xfa/src/fxfa/src/app/xfa_ffwidgetacc.cpp b/xfa/src/fxfa/src/app/xfa_ffwidgetacc.cpp index 8a4c18823c..79f4ee1ccf 100644 --- a/xfa/src/fxfa/src/app/xfa_ffwidgetacc.cpp +++ b/xfa/src/fxfa/src/app/xfa_ffwidgetacc.cpp @@ -968,7 +968,6 @@ FX_BOOL CXFA_WidgetAcc::CalculateImageAutoSize(CFX_SizeF& size) { } size.Set(0, 0); if (CFX_DIBitmap* pBitmap = GetImageImage()) { - CXFA_Image imageObj = GetFormValue().GetImage(); CFX_RectF rtImage, rtFit; rtImage.Set(0, 0, 0, 0); rtFit.Set(0, 0, 0, 0); diff --git a/xfa/src/fxfa/src/app/xfa_ffwidgethandler.cpp b/xfa/src/fxfa/src/app/xfa_ffwidgethandler.cpp index ce2a91c3dc..4ef638333b 100644 --- a/xfa/src/fxfa/src/app/xfa_ffwidgethandler.cpp +++ b/xfa/src/fxfa/src/app/xfa_ffwidgethandler.cpp @@ -227,7 +227,7 @@ FX_BOOL CXFA_FFWidgetHandler::HasEvent(CXFA_WidgetAcc* pWidgetAcc, if (!calc) { return FALSE; } - if (CXFA_Script script = calc.GetScript()) { + if (calc.GetScript()) { return TRUE; } return FALSE; @@ -452,8 +452,7 @@ CXFA_Node* CXFA_FFWidgetHandler::CreateField(XFA_ELEMENT eElement, CXFA_Node* pParent, CXFA_Node* pBefore) const { CXFA_Node* pField = CreateFormItem(XFA_ELEMENT_Field, pParent, pBefore); - CXFA_Node* pUi = CreateCopyNode(XFA_ELEMENT_Ui, pField); - CXFA_Node* pCheckButton = CreateCopyNode(eElement, pUi); + CreateCopyNode(eElement, CreateCopyNode(XFA_ELEMENT_Ui, pField)); CreateFontNode(pField); return pField; } @@ -470,8 +469,7 @@ CXFA_Node* CXFA_FFWidgetHandler::CreateRectangle(CXFA_Node* pParent, CXFA_Node* CXFA_FFWidgetHandler::CreateImage(CXFA_Node* pParent, CXFA_Node* pBefore) const { CXFA_Node* pField = CreateDraw(XFA_ELEMENT_Image, pParent, pBefore); - CXFA_Node* pUi = CreateCopyNode(XFA_ELEMENT_Ui, pField); - CXFA_Node* pImage = CreateCopyNode(XFA_ELEMENT_ImageEdit, pUi); + CreateCopyNode(XFA_ELEMENT_ImageEdit, CreateCopyNode(XFA_ELEMENT_Ui, pField)); return pField; } CXFA_Node* CXFA_FFWidgetHandler::CreateLine(CXFA_Node* pParent, @@ -482,8 +480,7 @@ CXFA_Node* CXFA_FFWidgetHandler::CreateLine(CXFA_Node* pParent, CXFA_Node* CXFA_FFWidgetHandler::CreateText(CXFA_Node* pParent, CXFA_Node* pBefore) const { CXFA_Node* pField = CreateDraw(XFA_ELEMENT_Text, pParent, pBefore); - CXFA_Node* pUi = CreateCopyNode(XFA_ELEMENT_Ui, pField); - CXFA_Node* pTextEdit = CreateCopyNode(XFA_ELEMENT_TextEdit, pUi); + CreateCopyNode(XFA_ELEMENT_TextEdit, CreateCopyNode(XFA_ELEMENT_Ui, pField)); CreateFontNode(pField); return pField; } @@ -565,7 +562,7 @@ CXFA_Node* CXFA_FFWidgetHandler::CreateMarginNode(CXFA_Node* pParent, CXFA_Node* CXFA_FFWidgetHandler::CreateValueNode(XFA_ELEMENT eValue, CXFA_Node* pParent) const { CXFA_Node* pValue = CreateCopyNode(XFA_ELEMENT_Value, pParent); - CXFA_Node* pDate = CreateCopyNode(eValue, pValue); + CreateCopyNode(eValue, pValue); return pValue; } IXFA_ObjFactory* CXFA_FFWidgetHandler::GetObjFactory() const { diff --git a/xfa/src/fxfa/src/app/xfa_textlayout.cpp b/xfa/src/fxfa/src/app/xfa_textlayout.cpp index 145da83baf..06f6b4cff9 100644 --- a/xfa/src/fxfa/src/app/xfa_textlayout.cpp +++ b/xfa/src/fxfa/src/app/xfa_textlayout.cpp @@ -1572,7 +1572,7 @@ FX_BOOL CXFA_TextLayout::LoadRichText(IFDE_XMLNode* pXMLNode, } if (wsName == FX_WSTRC(L"a")) { if (pLinkData != NULL) { - FX_DWORD dwRefCount = pLinkData->Release(); + pLinkData->Release(); pLinkData = NULL; } } diff --git a/xfa/src/fxfa/src/common/xfa_utils.h b/xfa/src/fxfa/src/common/xfa_utils.h index bd3236967b..8f8a36f621 100644 --- a/xfa/src/fxfa/src/common/xfa_utils.h +++ b/xfa/src/fxfa/src/common/xfa_utils.h @@ -59,7 +59,6 @@ class CXFA_NodeIteratorTemplate { } NodeType* GetRoot() { return m_pRoot; } NodeType* MoveToPrev() { - NodeType* pCurrent = GetCurrent(); int32_t nStackLength = m_NodeStack.GetSize(); if (nStackLength == 1) { return NULL; diff --git a/xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.cpp b/xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.cpp index 8641cae71b..8a87763bf2 100644 --- a/xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.cpp +++ b/xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.cpp @@ -325,7 +325,6 @@ void CXFA_FM2JSContext::Ceil(FXJSE_HOBJECT hThis, CFXJSE_Arguments& args) { CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL); - FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime(); if (args.GetLength() == 1) { FXJSE_HVALUE argValue = GetSimpleHValue(hThis, args, 0); if (HValueIsNull(hThis, argValue)) { @@ -409,7 +408,6 @@ void CXFA_FM2JSContext::Floor(FXJSE_HOBJECT hThis, CFXJSE_Arguments& args) { CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL); - FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime(); if (args.GetLength() == 1) { FXJSE_HVALUE argValue = GetSimpleHValue(hThis, args, 0); if (HValueIsNull(hThis, argValue)) { @@ -1347,8 +1345,8 @@ void CXFA_FM2JSContext::Num2Date(FXJSE_HOBJECT hThis, CFX_ByteString szIsoDateString; szIsoDateString.Format("%d%02d%02d", iYear + i, iMonth, iDay); CFX_ByteString szLocalDateString; - FX_BOOL bRet = IsoDate2Local(hThis, szIsoDateString, formatString, - localString, szLocalDateString); + IsoDate2Local(hThis, szIsoDateString, formatString, + localString, szLocalDateString); if (szLocalDateString.IsEmpty()) { szLocalDateString = FX_BSTRC(""); } @@ -3197,7 +3195,6 @@ void CXFA_FM2JSContext::Within(FXJSE_HOBJECT hThis, void CXFA_FM2JSContext::If(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments& args) { - int32_t argc = args.GetLength(); if (args.GetLength() == 3) { FXJSE_HVALUE argCondition = GetSimpleHValue(hThis, args, 0); FXJSE_HVALUE argFirstValue = GetSimpleHValue(hThis, args, 1); @@ -3463,10 +3460,8 @@ void CXFA_FM2JSContext::UnitValue(FXJSE_HOBJECT hThis, while (*(pData + u) == 0x20 || *(pData + u) == 0x09 || *(pData + u) == 0x0B || *(pData + u) == 0x0C || *(pData + u) == 0x0A || *(pData + u) == 0x0D) { - FX_CHAR ch = *(pData + u); ++u; } - int32_t uStart = u; while (u < unitspanString.GetLength()) { if ((*(pData + u) > '9' || *(pData + u) < '0') && *(pData + u) != '.' && *(pData + u) != '-') { @@ -3611,7 +3606,6 @@ void CXFA_FM2JSContext::At(FXJSE_HOBJECT hThis, CFXJSE_Arguments& args) { CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL); - FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime(); if (args.GetLength() == 2) { FXJSE_HVALUE argOne = GetSimpleHValue(hThis, args, 0); FXJSE_HVALUE argTwo = GetSimpleHValue(hThis, args, 1); @@ -3641,7 +3635,6 @@ void CXFA_FM2JSContext::Concat(FXJSE_HOBJECT hThis, CFXJSE_Arguments& args) { CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL); - FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime(); int32_t argc = args.GetLength(); if (argc >= 1) { CFX_ByteString resultString; @@ -3675,7 +3668,6 @@ void CXFA_FM2JSContext::Decode(FXJSE_HOBJECT hThis, CFXJSE_Arguments& args) { CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL); - FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime(); int32_t argc = args.GetLength(); if (argc == 1) { FXJSE_HVALUE argOne = GetSimpleHValue(hThis, args, 0); @@ -3946,7 +3938,6 @@ void CXFA_FM2JSContext::Encode(FXJSE_HOBJECT hThis, CFXJSE_Arguments& args) { CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL); - FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime(); int32_t argc = args.GetLength(); if (argc == 1) { FXJSE_HVALUE argOne = GetSimpleHValue(hThis, args, 0); @@ -4447,7 +4438,6 @@ void CXFA_FM2JSContext::Left(FXJSE_HOBJECT hThis, CFXJSE_Arguments& args) { CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL); - FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime(); if (args.GetLength() == 2) { FXJSE_HVALUE argOne = GetSimpleHValue(hThis, args, 0); FXJSE_HVALUE argTwo = GetSimpleHValue(hThis, args, 1); @@ -4479,7 +4469,6 @@ void CXFA_FM2JSContext::Len(FXJSE_HOBJECT hThis, CFXJSE_Arguments& args) { CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL); - FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime(); if (args.GetLength() == 1) { FXJSE_HVALUE argOne = GetSimpleHValue(hThis, args, 0); if (HValueIsNull(hThis, argOne)) { @@ -4550,7 +4539,6 @@ void CXFA_FM2JSContext::Ltrim(FXJSE_HOBJECT hThis, CFXJSE_Arguments& args) { CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL); - FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime(); if (args.GetLength() == 1) { FXJSE_HVALUE argOne = GetSimpleHValue(hThis, args, 0); if (HValueIsNull(hThis, argOne)) { @@ -4779,7 +4767,6 @@ void CXFA_FM2JSContext::Right(FXJSE_HOBJECT hThis, CFXJSE_Arguments& args) { CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL); - FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime(); if (args.GetLength() == 2) { FXJSE_HVALUE argOne = GetSimpleHValue(hThis, args, 0); FXJSE_HVALUE argTwo = GetSimpleHValue(hThis, args, 1); @@ -4811,7 +4798,6 @@ void CXFA_FM2JSContext::Rtrim(FXJSE_HOBJECT hThis, CFXJSE_Arguments& args) { CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL); - FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime(); if (args.GetLength() == 1) { FXJSE_HVALUE argOne = GetSimpleHValue(hThis, args, 0); if (HValueIsNull(hThis, argOne)) { @@ -4833,7 +4819,6 @@ void CXFA_FM2JSContext::Space(FXJSE_HOBJECT hThis, CFXJSE_Arguments& args) { CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL); - FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime(); if (args.GetLength() == 1) { FXJSE_HVALUE argOne = GetSimpleHValue(hThis, args, 0); if (FXJSE_Value_IsNull(argOne)) { @@ -6360,7 +6345,6 @@ void CXFA_FM2JSContext::eval_translation(FXJSE_HOBJECT hThis, CFXJSE_Arguments& args) { CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL); - FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime(); int32_t argc = args.GetLength(); if (argc == 1) { FXJSE_HVALUE argOne = GetSimpleHValue(hThis, args, 0); diff --git a/xfa/src/fxfa/src/parser/xfa_document_datamerger_imp.cpp b/xfa/src/fxfa/src/parser/xfa_document_datamerger_imp.cpp index 8da91847fc..93ec1da24e 100644 --- a/xfa/src/fxfa/src/parser/xfa_document_datamerger_imp.cpp +++ b/xfa/src/fxfa/src/parser/xfa_document_datamerger_imp.cpp @@ -51,7 +51,7 @@ static void XFA_DataMerge_FormValueNode_MatchNoneCreateChild( CXFA_Node* pFormNode) { CXFA_WidgetData* pWidgetData = pFormNode->GetWidgetData(); FXSYS_assert(pWidgetData); - XFA_ELEMENT eUIType = pWidgetData->GetUIType(); + pWidgetData->GetUIType(); } static FX_BOOL XFA_DataMerge_FormValueNode_SetChildContent( CXFA_Node* pValueNode, @@ -840,7 +840,7 @@ static CXFA_Node* XFA_DataMerge_CopyContainer_SubformSet( subformMapArray.SetAt(pSubformNode, pDataNode); subformArray.Add(pSubformNode); } - FX_POSITION position = subformMapArray.GetStartPosition(); + subformMapArray.GetStartPosition(); for (int32_t iIndex = 0; iIndex < subformArray.GetSize(); iIndex++) { CXFA_Node* pSubform = subformArray[iIndex]; CXFA_Node* pDataNode = (CXFA_Node*)subformMapArray.GetValueAt(pSubform); @@ -862,7 +862,6 @@ static CXFA_Node* XFA_DataMerge_CopyContainer_SubformSet( } for (; iMax < 0 || iCurRepeatIndex < iMax; iCurRepeatIndex++) { FX_BOOL bSelfMatch = FALSE; - CXFA_Node* pOldNode = sNodeIterator.GetCurrent(); XFA_ATTRIBUTEENUM eBindMatch = XFA_ATTRIBUTEENUM_None; if (!XFA_DataMerge_FindMatchingDataNode( pDocument, pTemplateNode, pDataScope, bAccessedDataDOM, FALSE, diff --git a/xfa/src/fxfa/src/parser/xfa_layout_itemlayout.cpp b/xfa/src/fxfa/src/parser/xfa_layout_itemlayout.cpp index 22f8941b18..54279a53d0 100644 --- a/xfa/src/fxfa/src/parser/xfa_layout_itemlayout.cpp +++ b/xfa/src/fxfa/src/parser/xfa_layout_itemlayout.cpp @@ -1562,9 +1562,6 @@ static void XFA_ItemLayoutProcessor_AddTrailerBeforeSplit( fBottomInset = pMarginNode->GetMeasure(XFA_ATTRIBUTE_BottomInset).ToUnit(XFA_UNIT_Pt); } - FX_FLOAT fWidth = pTrailerLayoutItem->m_sSize.x; - XFA_ATTRIBUTEENUM eLayout = - pProcessor->m_pFormNode->GetEnum(XFA_ATTRIBUTE_Layout); if (!pProcessor->IsAddNewRowForTrailer(pTrailerLayoutItem)) { pTrailerLayoutItem->m_sPos.y = pProcessor->m_fLastRowY; pTrailerLayoutItem->m_sPos.x = pProcessor->m_fLastRowWidth; diff --git a/xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.cpp b/xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.cpp index 4ab1dc96f2..5688d69e48 100644 --- a/xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.cpp +++ b/xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.cpp @@ -185,7 +185,6 @@ static void XFA_LayoutItemMgr_ReorderLayoutItemToTail( if (!pParentLayoutItem) { return; } - CXFA_LayoutItemImpl* pNext = pLayoutItem->m_pNextSibling; pParentLayoutItem->RemoveChild(pLayoutItem); pParentLayoutItem->AddChild(pLayoutItem); } @@ -196,7 +195,6 @@ static void XFA_LayoutItemMgr_RemoveLayoutItem( if (!pParentLayoutItem) { return; } - CXFA_LayoutItemImpl* pNext = pLayoutItem->m_pNextSibling; pParentLayoutItem->RemoveChild(pLayoutItem); } void CXFA_LayoutPageMgr::RemoveLayoutRecord(CXFA_ContainerRecord* pNewRecord, @@ -989,7 +987,6 @@ FX_BOOL CXFA_LayoutPageMgr::FindPageAreaFromPageSet( if (pPageSet == NULL && pStartChild == NULL) { return FALSE; } - int32_t iPageSetCount = 0; if (IsPageSetRootOrderedOccurrence()) { return FindPageAreaFromPageSet_Ordered(pPageSet, pStartChild, pTargetPageArea, pTargetContentArea, @@ -1080,9 +1077,6 @@ FX_BOOL CXFA_LayoutPageMgr::FindPageAreaFromPageSet_SimplexDuplex( FX_BOOL bNewPage, FX_BOOL bQuery, XFA_ATTRIBUTEENUM ePreferredPosition) { - XFA_ATTRIBUTEENUM eAdvisedPagePosition = - pTargetPageArea ? pTargetPageArea->GetEnum(XFA_ATTRIBUTE_PagePosition) - : (XFA_ATTRIBUTEENUM)-1; const XFA_ATTRIBUTEENUM eFallbackPosition = XFA_ATTRIBUTEENUM_Any; CXFA_Node *pPreferredPageArea = NULL, *pFallbackPageArea = NULL; CXFA_Node* pCurrentNode = NULL; diff --git a/xfa/src/fxfa/src/parser/xfa_object_imp.cpp b/xfa/src/fxfa/src/parser/xfa_object_imp.cpp index 0bacfcd074..cf906072f3 100644 --- a/xfa/src/fxfa/src/parser/xfa_object_imp.cpp +++ b/xfa/src/fxfa/src/parser/xfa_object_imp.cpp @@ -693,8 +693,8 @@ void CXFA_Node::Script_Som_ResolveNodeList(FXJSE_HVALUE hValue, if (refNode == NULL) { refNode = this; } - int32_t iRet = pScriptContext->ResolveObjects(refNode, wsExpression, - resoveNodeRS, dwFlag); + pScriptContext->ResolveObjects(refNode, wsExpression, + resoveNodeRS, dwFlag); CXFA_ArrayNodeList* pNodeList = new CXFA_ArrayNodeList(m_pDocument); if (resoveNodeRS.dwFlags == XFA_RESOVENODE_RSTYPE_Nodes) { for (int32_t i = 0; i < resoveNodeRS.nodes.GetSize(); i++) { @@ -2762,9 +2762,7 @@ void CXFA_Node::Script_Template_CreateNode(CFXJSE_Arguments* pArguments) { } } void CXFA_Node::Script_Template_Recalculate(CFXJSE_Arguments* pArguments) { - int32_t argc = pArguments->GetLength(); - if (argc == 1) { - FX_BOOL bScriptFlags = pArguments->GetInt32(0) == 0 ? FALSE : TRUE; + if (pArguments->GetLength() == 1) { FXJSE_Value_SetBoolean(pArguments->GetReturnValue(), TRUE); } else { ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"recalculate"); @@ -3336,8 +3334,6 @@ int32_t CXFA_Node::InstanceManager_SetInstances(int32_t iDesired) { } } } else if (iDesired > iCount) { - CXFA_Node* pTemplateNode = GetTemplateNode(); - CXFA_Node* pFormNode = GetNodeItem(XFA_NODEITEM_NextSibling); while (iCount < iDesired) { CXFA_Node* pNewInstance = XFA_ScriptInstanceManager_CreateInstance(this, TRUE); @@ -3416,7 +3412,6 @@ void CXFA_Node::Script_Form_FormNodes(CFXJSE_Arguments* pArguments) { CXFA_Node* pDataNode = (CXFA_Node*)pArguments->GetObject(0); if (pDataNode) { CXFA_NodeArray formItems; - int32_t iSize = pDataNode->GetBindItems(formItems); CXFA_ArrayNodeList* pFormNodes = new CXFA_ArrayNodeList(m_pDocument); pFormNodes->SetArrayNodeList(formItems); FXJSE_Value_SetObject( diff --git a/xfa/src/fxfa/src/parser/xfa_objectacc_imp.cpp b/xfa/src/fxfa/src/parser/xfa_objectacc_imp.cpp index c239ac1d70..c7cd0f2078 100644 --- a/xfa/src/fxfa/src/parser/xfa_objectacc_imp.cpp +++ b/xfa/src/fxfa/src/parser/xfa_objectacc_imp.cpp @@ -2179,7 +2179,6 @@ int32_t CXFA_WidgetData::CountSelectedItems() { int32_t CXFA_WidgetData::GetSelectedItem(int32_t nIndex) { CFX_WideStringArray wsValueArray; GetSelectedItemsValue(wsValueArray); - int32_t iSelected = 0; CFX_WideStringArray wsSaveTextArray; GetChoiceListItems(wsSaveTextArray, TRUE); int32_t iSaves = wsSaveTextArray.GetSize(); @@ -2822,7 +2821,6 @@ static CFX_WideString XFA_NumericNormalize(const CFX_WideString& wsValue, int32_t iIndex = 0; CFX_WideString wsRet; FX_WCHAR* pRetBuffer = wsRet.GetBuffer(iCount); - int32_t iDestCount = 0; int32_t i = 0; if (wsNewValue[i] == L'-') { pRetBuffer[iIndex++] = '-'; diff --git a/xfa/src/fxfa/src/parser/xfa_parser_imp.cpp b/xfa/src/fxfa/src/parser/xfa_parser_imp.cpp index 48547d7e9f..b0bbf4db75 100644 --- a/xfa/src/fxfa/src/parser/xfa_parser_imp.cpp +++ b/xfa/src/fxfa/src/parser/xfa_parser_imp.cpp @@ -421,8 +421,7 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_XDP( pPacketInfo->eFlags)) { continue; } - if (CXFA_Node* pChildNode = - pXFARootNode->GetFirstChildByName(pPacketInfo->uHash)) { + if (pXFARootNode->GetFirstChildByName(pPacketInfo->uHash)) { return nullptr; } pXMLConfigDOMRoot = pChildItem; @@ -1266,7 +1265,6 @@ void CXFA_SimpleParser::ParseDataValue(CXFA_Node* pXFANode, continue; } CFX_WideString wsText; - FX_BOOL bBreak = FALSE; if (eNodeType == FDE_XMLNODE_Text) { ((IFDE_XMLText*)pXMLChild)->GetText(wsText); if (!pXMLCurValueNode) { @@ -1356,7 +1354,6 @@ void CXFA_SimpleParser::ParseInstruction(CXFA_Node* pXFANode, } CFX_WideString wsTargetName; pXMLInstruction->GetTargetName(wsTargetName); - int32_t iDataCount = pXMLInstruction->CountData(); if (wsTargetName == FX_WSTRC(L"originalXFAVersion")) { CFX_WideString wsData; if (pXMLInstruction->GetData(0, wsData) && diff --git a/xfa/src/fxfa/src/parser/xfa_script_hostpseudomodel.cpp b/xfa/src/fxfa/src/parser/xfa_script_hostpseudomodel.cpp index 7b557f139a..21a4fa1997 100644 --- a/xfa/src/fxfa/src/parser/xfa_script_hostpseudomodel.cpp +++ b/xfa/src/fxfa/src/parser/xfa_script_hostpseudomodel.cpp @@ -506,7 +506,6 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_SetFocus( if (!pNotify) { return; } - IXFA_Doc* hDoc = pNotify->GetHDOC(); CXFA_Node* pNode = NULL; if (iLength >= 1) { FXJSE_HVALUE hValue = pArguments->GetValue(0); diff --git a/xfa/src/fxfa/src/parser/xfa_script_layoutpseudomodel.cpp b/xfa/src/fxfa/src/parser/xfa_script_layoutpseudomodel.cpp index 14c8f2d409..554fde9363 100644 --- a/xfa/src/fxfa/src/parser/xfa_script_layoutpseudomodel.cpp +++ b/xfa/src/fxfa/src/parser/xfa_script_layoutpseudomodel.cpp @@ -32,7 +32,6 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_Ready( if (!pNotify) { return; } - IXFA_Doc* hDoc = pNotify->GetHDOC(); if (bSetting) { ThrowScriptErrorMessage(XFA_IDS_UNABLE_SET_READY); return; diff --git a/xfa/src/fxfa/src/parser/xfa_script_resolveprocessor.cpp b/xfa/src/fxfa/src/parser/xfa_script_resolveprocessor.cpp index 7919395a56..befff73141 100644 --- a/xfa/src/fxfa/src/parser/xfa_script_resolveprocessor.cpp +++ b/xfa/src/fxfa/src/parser/xfa_script_resolveprocessor.cpp @@ -164,7 +164,6 @@ int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_Excalmatory( } int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_NumberSign( CXFA_ResolveNodesData& rnd) { - FX_DWORD dwStyles = rnd.m_dwStyles; CFX_WideString wsName = rnd.m_wsName.Right(rnd.m_wsName.GetLength() - 1); CFX_WideString wsCondition = rnd.m_wsCondition; CXFA_Node* curNode = (CXFA_Node*)rnd.m_CurNode; @@ -336,12 +335,10 @@ int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_Normal( } } if (dwStyles & XFA_RESOLVENODE_Properties) { - FX_BOOL bSetFlag = FALSE; for (int32_t i = 0; i < properties.GetSize(); i++) { CXFA_Node* childProperty = properties[i]; if (childProperty->IsUnnamed()) { uint32_t uPropHash = childProperty->GetClassHashCode(); - XFA_ELEMENT eName = childProperty->GetClassID(); if (uPropHash == uNameHash) { nodes.Add(childProperty); } @@ -535,7 +532,6 @@ int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_GetFilter( CFX_WideString& wsCondition = rnd.m_wsCondition; FX_WCHAR* pNameBuf = wsName.GetBuffer(iLength - nStart); FX_WCHAR* pConditionBuf = wsCondition.GetBuffer(iLength - nStart); - int32_t nCount = 0; int32_t nNameCount = 0; int32_t nConditionCount = 0; CFX_Int32Array stack; diff --git a/xfa/src/fxfa/src/parser/xfa_utils_imp.cpp b/xfa/src/fxfa/src/parser/xfa_utils_imp.cpp index 1e7d9be1b4..abe5fdbd48 100644 --- a/xfa/src/fxfa/src/parser/xfa_utils_imp.cpp +++ b/xfa/src/fxfa/src/parser/xfa_utils_imp.cpp @@ -315,7 +315,6 @@ FX_DOUBLE XFA_WideStringToDouble(const CFX_WideString& wsStringVal) { CFX_WideString wsValue = wsStringVal; wsValue.TrimLeft(); wsValue.TrimRight(); - FX_BOOL bValid = TRUE; int64_t nIntegral = 0; FX_DWORD dwFractional = 0; int32_t nExponent = 0; -- cgit v1.2.3