From 038aa531bcf1a76764d3cef46fd9b8e08b166dae Mon Sep 17 00:00:00 2001 From: weili Date: Fri, 20 May 2016 15:38:29 -0700 Subject: Clean up XFA code which causes warnings This is part of efforts to bring XFA to chromium_code standard. The warnings are from unreachable code, or using potentially uninitialized variables, or using assignment within a condition. This change list only contains easy to fix cases. More cleanups will follow. BUG=pdfium:29 Review-Url: https://codereview.chromium.org/1998873002 --- xfa/fxfa/parser/xfa_localemgr.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'xfa/fxfa/parser/xfa_localemgr.cpp') diff --git a/xfa/fxfa/parser/xfa_localemgr.cpp b/xfa/fxfa/parser/xfa_localemgr.cpp index 0982537b15..83c7cf025d 100644 --- a/xfa/fxfa/parser/xfa_localemgr.cpp +++ b/xfa/fxfa/parser/xfa_localemgr.cpp @@ -1123,9 +1123,8 @@ static uint16_t XFA_GetLanguage(CFX_WideString wsLanguage) { CXFA_LocaleMgr::CXFA_LocaleMgr(CXFA_Node* pLocaleSet, CFX_WideString wsDeflcid) : m_dwLocaleFlags(0x00) { m_dwDeflcid = XFA_GetLanguage(wsDeflcid); - CXFA_Node* pNodeLocale = NULL; - if (pLocaleSet && - (pNodeLocale = pLocaleSet->GetNodeItem(XFA_NODEITEM_FirstChild))) { + if (pLocaleSet) { + CXFA_Node* pNodeLocale = pLocaleSet->GetNodeItem(XFA_NODEITEM_FirstChild); while (pNodeLocale) { m_LocaleArray.Add(new CXFA_NodeLocale(pNodeLocale)); pNodeLocale = pNodeLocale->GetNodeItem(XFA_NODEITEM_NextSibling); -- cgit v1.2.3