sd/qa/unit/import-tests2.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 633b9aebf8ac50f5e46e70f9f371fe7b936e0e1d
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Tue Mar 14 22:31:33 2023 +0100
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Wed Mar 15 07:59:50 2023 +0000

    Silence a false -Werror=maybe-uninitialized
    
    ...seen at least with gcc-c++-13.0.1-0.7.fc38.x86_64,
    
    > In file included from include/test/bootstrapfixture.hxx:20,
    >                  from include/test/unoapi_test.hxx:18,
    >                  from include/test/unoapixml_test.hxx:15,
    >                  from sd/qa/unit/sdmodeltestbase.hxx:15,
    >                  from sd/qa/unit/import-tests2.cxx:12:
    > sd/qa/unit/import-tests2.cxx: In member function ‘void 
testTdf152186::TestBody()’:
    > workdir/UnpackedTarball/cppunit/include/cppunit/TestAssert.h:274:33: 
error: ‘bHasShadow’ may be used uninitialized [-Werror=maybe-uninitialized]
    >   274 |   ( CPPUNIT_NS::Asserter::failIf( !(condition),                   
                \
    >       |   
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    >   275 |                                  CPPUNIT_NS::Message( "assertion 
failed",         \
    >       |                                  
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    >   276 |                                                       
"Expression: " #condition), \
    >       |                                                       
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    >   277 |                                  CPPUNIT_SOURCELINE() ) )
    >       |                                  ~~~~~~~~~~~~~~~~~~~~~~~~
    > sd/qa/unit/import-tests2.cxx:86:9: note: in expansion of macro 
‘CPPUNIT_ASSERT’
    >    86 |         CPPUNIT_ASSERT(!bHasShadow);
    >       |         ^~~~~~~~~~~~~~
    > sd/qa/unit/import-tests2.cxx:80:10: note: ‘bHasShadow’ was declared here
    >    80 |     bool bHasShadow;
    >       |          ^~~~~~~~~~
    
    Change-Id: Ia6409c9558a6e76981a738fdf29fd6a23c440255
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148900
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/sd/qa/unit/import-tests2.cxx b/sd/qa/unit/import-tests2.cxx
index ceeb2603bf35..37a185c4d3f8 100644
--- a/sd/qa/unit/import-tests2.cxx
+++ b/sd/qa/unit/import-tests2.cxx
@@ -77,7 +77,7 @@ CPPUNIT_TEST_FIXTURE(SdImportTest2, testTdf152186)
     createSdImpressDoc("pptx/tdf152186.pptx");
     saveAndReload("Impress MS PowerPoint 2007 XML");
 
-    bool bHasShadow;
+    bool bHasShadow = bool();
     const SdrPage* pPage = GetPage(1);
     for (size_t i = 0; i < pPage->GetObjCount(); ++i)
     {

Reply via email to