cli_ure/source/climaker/climaker_emit.cxx | 2 - lotuswordpro/source/filter/lwppara1.cxx | 29 ++++++++++------------------ lotuswordpro/source/filter/lwpparastyle.hxx | 2 - 3 files changed, 13 insertions(+), 20 deletions(-)
New commits: commit 6793ae2504dea490d26cbf9b2ebd33774a66d639 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sat Oct 20 20:50:31 2018 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Sun Oct 21 18:18:40 2018 +0200 GetBulletOverride never returns nullptr Change-Id: I9becc9397a93369cd46922b66b45990e9e6a51f1 Reviewed-on: https://gerrit.libreoffice.org/62108 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/lotuswordpro/source/filter/lwppara1.cxx b/lotuswordpro/source/filter/lwppara1.cxx index 8909346a9fba..7fb671cc4ccb 100644 --- a/lotuswordpro/source/filter/lwppara1.cxx +++ b/lotuswordpro/source/filter/lwppara1.cxx @@ -467,12 +467,8 @@ void LwpPara::OverrideParaBullet(LwpParaProperty* pProps) { m_bHasBullet = true; - const LwpOverride* pBullet= pParaStyle->GetBulletOverride(); - std::unique_ptr<LwpBulletOverride> xFinalBullet( - pBullet - ? polymorphic_downcast<LwpBulletOverride*>(pBullet->clone()) - : new LwpBulletOverride) - ; + const LwpBulletOverride& rBullet= pParaStyle->GetBulletOverride(); + std::unique_ptr<LwpBulletOverride> xFinalBullet(rBullet.clone()); std::unique_ptr<LwpBulletOverride> const pLocalBullet2(pLocalBullet->clone()); pLocalBullet2->Override(xFinalBullet.get()); @@ -491,21 +487,18 @@ void LwpPara::OverrideParaBullet(LwpParaProperty* pProps) } else { - const LwpBulletOverride* pBullOver = pParaStyle->GetBulletOverride(); - if (pBullOver) + const LwpBulletOverride& rBullOver = pParaStyle->GetBulletOverride(); + m_aSilverBulletID = rBullOver.GetSilverBullet(); + if (!m_aSilverBulletID.IsNull()) { - m_aSilverBulletID = pBullOver->GetSilverBullet(); - if (!m_aSilverBulletID.IsNull()) - { - m_bHasBullet = true; - - m_pSilverBullet = dynamic_cast<LwpSilverBullet*>(m_aSilverBulletID.obj(VO_SILVERBULLET).get()); - if (m_pSilverBullet) - m_pSilverBullet->SetFoundry(m_pFoundry); - } + m_bHasBullet = true; - m_xBullOver.reset(pBullOver->clone()); + m_pSilverBullet = dynamic_cast<LwpSilverBullet*>(m_aSilverBulletID.obj(VO_SILVERBULLET).get()); + if (m_pSilverBullet) + m_pSilverBullet->SetFoundry(m_pFoundry); } + + m_xBullOver.reset(rBullOver.clone()); } } /** diff --git a/lotuswordpro/source/filter/lwpparastyle.hxx b/lotuswordpro/source/filter/lwpparastyle.hxx index 8ffa26af9a7f..3dc461ae1518 100644 --- a/lotuswordpro/source/filter/lwpparastyle.hxx +++ b/lotuswordpro/source/filter/lwpparastyle.hxx @@ -97,7 +97,7 @@ public: LwpParaBorderOverride* GetParaBorder() const; LwpBreaksOverride* GetBreaks() const; LwpTabOverride* GetTabOverride() const; - const LwpBulletOverride* GetBulletOverride() const { return &m_BulletOverride;} + const LwpBulletOverride& GetBulletOverride() const { return m_BulletOverride; } LwpNumberingOverride* GetNumberingOverride() const; public: static void ApplySubBorder(LwpBorderStuff* pBorderStuff, LwpBorderStuff::BorderType eType, XFBorders* pXFBorders); commit d1771e8de2f49193821d281239cc6b99c7c692e4 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sat Oct 20 19:21:24 2018 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Sun Oct 21 18:18:26 2018 +0200 pvs-studio: Potentially uninitialized pointer 'ret_type' used. Change-Id: I2f6faf1264a62012724d9fe34352a76ea5491717 Reviewed-on: https://gerrit.libreoffice.org/62096 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/cli_ure/source/climaker/climaker_emit.cxx b/cli_ure/source/climaker/climaker_emit.cxx index 24eb3e455754..ed864e18298f 100644 --- a/cli_ure/source/climaker/climaker_emit.cxx +++ b/cli_ure/source/climaker/climaker_emit.cxx @@ -273,7 +273,7 @@ Assembly ^ TypeEmitter::type_resolve( ::System::Object ^, ::System::ResolveEventArgs ^ args ) { ::System::String ^ cts_name = args->Name; - ::System::Type ^ ret_type; + ::System::Type ^ ret_type = nullptr; iface_entry ^ entry = dynamic_cast< iface_entry ^ >(m_incomplete_ifaces[cts_name] ); if (nullptr != entry) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits