summaryrefslogtreecommitdiff
path: root/xfa/src/fdp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-11-05 08:46:13 -0800
committerTom Sepez <tsepez@chromium.org>2015-11-05 08:46:13 -0800
commit5570d23890cc7bae4903a29fbcf8ac543ba1a2c7 (patch)
tree9077948b2f9c187ecc3df125e79a1610db5ce1b7 /xfa/src/fdp
parentcd39695e618374ae0cfb4d3467602fd9a5365c55 (diff)
downloadpdfium-5570d23890cc7bae4903a29fbcf8ac543ba1a2c7.tar.xz
Fix XFA compilation warnings, part 2
Mostly unused variables, unused private members, or initialization order. Added a few missing initializers for pointer members along the way. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1414903004 .
Diffstat (limited to 'xfa/src/fdp')
-rw-r--r--xfa/src/fdp/src/css/fde_cssdatatable.h2
-rw-r--r--xfa/src/fdp/src/css/fde_cssstyleselector.cpp8
-rw-r--r--xfa/src/fdp/src/css/fde_cssstyleselector.h8
-rw-r--r--xfa/src/fdp/src/xml/fde_xml.cpp22
-rw-r--r--xfa/src/fdp/src/xml/fde_xml.h1
5 files changed, 19 insertions, 22 deletions
diff --git a/xfa/src/fdp/src/css/fde_cssdatatable.h b/xfa/src/fdp/src/css/fde_cssdatatable.h
index f4f5c3a096..53dfe8769f 100644
--- a/xfa/src/fdp/src/css/fde_cssdatatable.h
+++ b/xfa/src/fdp/src/css/fde_cssdatatable.h
@@ -9,7 +9,7 @@
class CFDE_CSSFunction : public CFX_Target {
public:
CFDE_CSSFunction(const FX_WCHAR* pszFuncName, IFDE_CSSValueList* pArgList)
- : m_pszFuncName(pszFuncName), m_pArgList(pArgList) {
+ : m_pArgList(pArgList), m_pszFuncName(pszFuncName) {
FXSYS_assert(pArgList != NULL);
}
int32_t CountArgs() const { return m_pArgList->CountValues(); }
diff --git a/xfa/src/fdp/src/css/fde_cssstyleselector.cpp b/xfa/src/fdp/src/css/fde_cssstyleselector.cpp
index ce8117b282..6600449aa5 100644
--- a/xfa/src/fdp/src/css/fde_cssstyleselector.cpp
+++ b/xfa/src/fdp/src/css/fde_cssstyleselector.cpp
@@ -590,16 +590,16 @@ void CFDE_CSSStyleSelector::AppendInlineStyle(CFDE_CSSDeclaration* pDecl,
}
pSyntax->Release();
}
+#define FDE_CSSNONINHERITS (pComputedStyle->m_NonInheritedData)
+#define FDE_CSSINHERITS (pComputedStyle->m_InheritedData)
+#define FDE_CSSFONTSIZE (FDE_CSSINHERITS.m_fFontSize)
void CFDE_CSSStyleSelector::ApplyProperty(
FDE_CSSPROPERTY eProperty,
IFDE_CSSValue* pValue,
CFDE_CSSComputedStyle* pComputedStyle) {
-#define FDE_CSSNONINHERITS (pComputedStyle->m_NonInheritedData)
-#define FDE_CSSINHERITS (pComputedStyle->m_InheritedData)
-#define FDE_CSSFONTSIZE (FDE_CSSINHERITS.m_fFontSize)
if (pComputedStyle->m_InheritedData.m_pFontFamily &&
*(FX_DWORD*)pComputedStyle->m_InheritedData.m_pFontFamily == 0xcdcdcdcd) {
- pComputedStyle = pComputedStyle;
+ pComputedStyle = pComputedStyle; // FIXME: likely a real bug.
}
if (pValue->GetType() == FDE_CSSVALUETYPE_Primitive) {
IFDE_CSSPrimitiveValue* pPrimitive = (IFDE_CSSPrimitiveValue*)pValue;
diff --git a/xfa/src/fdp/src/css/fde_cssstyleselector.h b/xfa/src/fdp/src/css/fde_cssstyleselector.h
index 733296699e..db159d2de1 100644
--- a/xfa/src/fdp/src/css/fde_cssstyleselector.h
+++ b/xfa/src/fdp/src/css/fde_cssstyleselector.h
@@ -21,10 +21,10 @@ typedef CFX_ArrayTemplate<FDE_LPCSSRULEDATA> CFDE_CSSRuleDataArray;
class CFDE_CSSRuleCollection : public CFX_Target {
public:
CFDE_CSSRuleCollection()
- : m_pStaticStore(NULL),
- m_pUniversalRules(NULL),
- m_iSelectors(0),
- m_pPersudoRules(NULL) {}
+ : m_pStaticStore(nullptr),
+ m_pUniversalRules(nullptr),
+ m_pPersudoRules(nullptr),
+ m_iSelectors(0) {}
~CFDE_CSSRuleCollection() { Clear(); }
void AddRulesFrom(const CFDE_CSSStyleSheetArray& sheets,
FX_DWORD dwMediaList,
diff --git a/xfa/src/fdp/src/xml/fde_xml.cpp b/xfa/src/fdp/src/xml/fde_xml.cpp
index 1931a57d11..66a4eeb2b8 100644
--- a/xfa/src/fdp/src/xml/fde_xml.cpp
+++ b/xfa/src/fdp/src/xml/fde_xml.cpp
@@ -1084,8 +1084,7 @@ void CFDE_XMLDoc::SaveXML(IFX_Stream* pXMLStream, FX_BOOL bSaveBOM) {
}
CFDE_XMLDOMParser::CFDE_XMLDOMParser(CFDE_XMLNode* pRoot,
IFDE_XMLSyntaxParser* pParser)
- : m_pRoot(pRoot),
- m_pParser(pParser),
+ : m_pParser(pParser),
m_pParent(pRoot),
m_pChild(NULL),
m_NodeStack(16),
@@ -1469,28 +1468,27 @@ IFDE_XMLSyntaxParser* IFDE_XMLSyntaxParser::Create() {
}
#ifdef _FDE_BLOCK_BUFFER
CFDE_XMLSyntaxParser::CFDE_XMLSyntaxParser()
- : m_pStream(NULL),
+ : m_pStream(nullptr),
m_iXMLPlaneSize(-1),
m_iCurrentPos(0),
m_iCurrentNodeNum(-1),
m_iLastNodeNum(-1),
m_iParsedChars(0),
m_iParsedBytes(0),
- m_pBuffer(NULL),
+ m_pBuffer(nullptr),
m_iBufferChars(0),
m_bEOS(FALSE),
- m_pStart(NULL),
- m_pEnd(NULL),
+ m_pStart(nullptr),
+ m_pEnd(nullptr),
m_XMLNodeStack(16),
+ m_iAllocStep(m_BlockBuffer.GetAllocStep()),
+ m_iDataLength(m_BlockBuffer.GetDataLengthRef()),
+ m_pCurrentBlock(nullptr),
+ m_iIndexInBlock(0),
+ m_iTextDataLength(0),
m_dwStatus(FDE_XMLSYNTAXSTATUS_None),
m_dwMode(FDE_XMLSYNTAXMODE_Text),
m_wQuotationMark(0),
- m_BlockBuffer(),
- m_pCurrentBlock(NULL),
- m_iIndexInBlock(0),
- m_iDataLength(m_BlockBuffer.GetDataLengthRef()),
- m_iAllocStep(m_BlockBuffer.GetAllocStep()),
- m_iTextDataLength(0),
m_iEntityStart(-1),
m_SkipStack(16) {
m_CurNode.iNodeNum = -1;
diff --git a/xfa/src/fdp/src/xml/fde_xml.h b/xfa/src/fdp/src/xml/fde_xml.h
index 6f7da80087..fb5ea6f44b 100644
--- a/xfa/src/fdp/src/xml/fde_xml.h
+++ b/xfa/src/fdp/src/xml/fde_xml.h
@@ -192,7 +192,6 @@ class CFDE_XMLDOMParser : public IFDE_XMLParser, public CFX_Target {
virtual int32_t DoParser(IFX_Pause* pPause);
private:
- CFDE_XMLNode* m_pRoot;
IFDE_XMLSyntaxParser* m_pParser;
CFDE_XMLNode* m_pParent;
CFDE_XMLNode* m_pChild;