[Libreoffice-commits] core.git: framework/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Wed Dec 4 19:45:34 UTC 2019


 framework/source/services/autorecovery.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e0e6b69e9a823e26b89158e32ad4982ed57e5a3f
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Wed Dec 4 16:31:15 2019 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Dec 4 20:44:33 2019 +0100

    -Werror=maybe-uninitialized
    
    And /org.openoffice.Office.Recovery/RecoveryEntry/DocumentState is nillable, so
    
      xItem->getPropertyValue(CFG_ENTRY_PROP_DOCUMENTSTATE) >>= tmp;
    
    can presumably fail.
    
    Change-Id: I08c38aec13b2ceda512925b18aefd5981cf85bcd
    Reviewed-on: https://gerrit.libreoffice.org/84422
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index 33974efa1539..f7176d5a6975 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -1826,7 +1826,7 @@ void AutoRecovery::implts_readConfig()
         xItem->getPropertyValue(CFG_ENTRY_PROP_TEMPURL) >>= aInfo.OldTempURL;
         xItem->getPropertyValue(CFG_ENTRY_PROP_TEMPLATEURL) >>= aInfo.TemplateURL;
         xItem->getPropertyValue(CFG_ENTRY_PROP_FILTER) >>= aInfo.RealFilter;
-        sal_Int32 tmp;
+        sal_Int32 tmp = 0;
         xItem->getPropertyValue(CFG_ENTRY_PROP_DOCUMENTSTATE) >>= tmp;
         aInfo.DocumentState = DocState(tmp);
         xItem->getPropertyValue(CFG_ENTRY_PROP_MODULE) >>= aInfo.AppModule;


More information about the Libreoffice-commits mailing list