From 2484d42c1c55dae09ec5886db11006c6d0be75f1 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Mon, 22 Feb 2016 14:08:33 -0800 Subject: Fix return values in CFWL_FormImp::EndDoModal(). Also remove unused variable in CFWL_FormImpDelegate::OnProcessMessage(). R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1717383003 . --- xfa/src/fwl/src/core/fwl_formimp.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/xfa/src/fwl/src/core/fwl_formimp.cpp b/xfa/src/fwl/src/core/fwl_formimp.cpp index d98d9d9ce6..dbb56f56f5 100644 --- a/xfa/src/fwl/src/core/fwl_formimp.cpp +++ b/xfa/src/fwl/src/core/fwl_formimp.cpp @@ -414,11 +414,11 @@ FWL_ERR CFWL_FormImp::EndDoModal() { m_pNoteLoop->EndModalLoop(); IFWL_NoteThread* pThread = GetOwnerThread(); if (!pThread) - return NULL; + return FWL_ERR_Indefinite; CFWL_NoteDriver* pDriver = static_cast(pThread->GetNoteDriver()); if (!pDriver) - return NULL; + return FWL_ERR_Indefinite; pDriver->PopNoteLoop(); SetStates(FWL_WGTSTATE_Invisible, TRUE); return FWL_ERR_Succeeded; @@ -878,7 +878,6 @@ int32_t CFWL_FormImpDelegate::OnProcessMessage(CFWL_Message* pMessage) { if (!pMessage) return 0; FX_DWORD dwMsgCode = pMessage->GetClassID(); - int32_t iRet = 1; switch (dwMsgCode) { case FWL_MSGHASH_Activate: { m_pOwner->m_pProperties->m_dwStates &= ~FWL_WGTSTATE_Deactivated; -- cgit v1.2.3