summaryrefslogtreecommitdiff
path: root/xfa/fxfa
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa')
-rw-r--r--xfa/fxfa/fm2js/cxfa_fmsimpleexpression_unittest.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_scriptcontext.cpp12
2 files changed, 10 insertions, 4 deletions
diff --git a/xfa/fxfa/fm2js/cxfa_fmsimpleexpression_unittest.cpp b/xfa/fxfa/fm2js/cxfa_fmsimpleexpression_unittest.cpp
index c465c96ff0..58ddbac806 100644
--- a/xfa/fxfa/fm2js/cxfa_fmsimpleexpression_unittest.cpp
+++ b/xfa/fxfa/fm2js/cxfa_fmsimpleexpression_unittest.cpp
@@ -66,7 +66,7 @@ TEST(FMStringExpressionTest, Long) {
CFX_WideTextBuf accumulator;
std::vector<CFX_WideStringC::UnsignedType> vec(140000, L'A');
CXFA_FMStringExpression(1, CFX_WideStringC(vec)).ToJavaScript(accumulator);
- EXPECT_EQ(140000, accumulator.GetLength());
+ EXPECT_EQ(140000u, accumulator.GetLength());
}
TEST(FMStringExpressionTest, Quoted) {
diff --git a/xfa/fxfa/parser/cxfa_scriptcontext.cpp b/xfa/fxfa/parser/cxfa_scriptcontext.cpp
index e7c86296ee..98b5da057f 100644
--- a/xfa/fxfa/parser/cxfa_scriptcontext.cpp
+++ b/xfa/fxfa/parser/cxfa_scriptcontext.cpp
@@ -624,7 +624,9 @@ int32_t CXFA_ScriptContext::ResolveObjects(CXFA_Object* refObject,
bool bCreate =
m_ResolveProcessor->GetNodeHelper()->ResolveNodes_CreateNode(
rndFind.m_wsName, rndFind.m_wsCondition,
- nStart == wsExpression.GetLength(), this);
+ nStart ==
+ pdfium::base::checked_cast<int32_t>(wsExpression.GetLength()),
+ this);
if (bCreate) {
continue;
} else {
@@ -650,7 +652,9 @@ int32_t CXFA_ScriptContext::ResolveObjects(CXFA_Object* refObject,
continue;
}
if (rndFind.m_dwFlag == XFA_RESOVENODE_RSTYPE_Attribute &&
- rndFind.m_pScriptAttribute && nStart < wsExpression.GetLength()) {
+ rndFind.m_pScriptAttribute &&
+ nStart <
+ pdfium::base::checked_cast<int32_t>(wsExpression.GetLength())) {
auto pValue = pdfium::MakeUnique<CFXJSE_Value>(m_pIsolate);
(rndFind.m_Objects.front()
->*(rndFind.m_pScriptAttribute->lpfnCallback))(
@@ -679,7 +683,9 @@ int32_t CXFA_ScriptContext::ResolveObjects(CXFA_Object* refObject,
bool bCreate =
m_ResolveProcessor->GetNodeHelper()->ResolveNodes_CreateNode(
rndFind.m_wsName, rndFind.m_wsCondition,
- nStart == wsExpression.GetLength(), this);
+ nStart == pdfium::base::checked_cast<int32_t>(
+ wsExpression.GetLength()),
+ this);
if (bCreate) {
continue;
} else {