sdext/source/pdfimport/pdfparse/pdfparse.cxx       |    2 +-
 sdext/source/pdfimport/tree/drawtreevisiting.cxx   |    1 +
 sdext/source/pdfimport/tree/writertreevisiting.cxx |    1 +
 sdext/source/pdfimport/wrapper/wrapper.cxx         |    2 +-
 unotest/source/cpp/getargument.cxx                 |    2 +-
 5 files changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 0ec327662a11554fe407c83abaf0ddbb97e73ed7
Author:     Caolán McNamara <[email protected]>
AuthorDate: Sat May 11 22:01:07 2024 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Sun May 12 14:05:31 2024 +0200

    WaE: C6011 Dereferencing NULL pointer warnings
    
    Change-Id: Ieabea4a0ddf8f95ea01b8b0275be0924ad055694
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167524
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/unotest/source/cpp/getargument.cxx 
b/unotest/source/cpp/getargument.cxx
index 22cd39fc5960..f9084c71a426 100644
--- a/unotest/source/cpp/getargument.cxx
+++ b/unotest/source/cpp/getargument.cxx
@@ -28,7 +28,7 @@ namespace test
 {
 bool getArgument(std::u16string_view name, OUString* value)
 {
-    OSL_ASSERT(value != nullptr);
+    assert(value);
     return rtl::Bootstrap::get(OUString::Concat("arg-") + name, *value);
 }
 }
commit db6f4c29ad2cb5cef009f78bbe6387a9e65a45a6
Author:     Caolán McNamara <[email protected]>
AuthorDate: Sat May 11 21:30:31 2024 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Sun May 12 14:05:24 2024 +0200

    WaE: C6011 Dereferencing NULL pointer warnings
    
    Change-Id: I83952aef1fd44d2b49cbaa2324283c14c83723de
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167522
    Reviewed-by: Caolán McNamara <[email protected]>
    Tested-by: Caolán McNamara <[email protected]>

diff --git a/sdext/source/pdfimport/pdfparse/pdfparse.cxx 
b/sdext/source/pdfimport/pdfparse/pdfparse.cxx
index 34424b9ec320..a340d0579e49 100644
--- a/sdext/source/pdfimport/pdfparse/pdfparse.cxx
+++ b/sdext/source/pdfimport/pdfparse/pdfparse.cxx
@@ -265,7 +265,7 @@ public:
     }
     #endif
 
-    static void parseError( const char* pMessage, const iteratorT& pLocation )
+    [[noreturn]] static void parseError( const char* pMessage, const 
iteratorT& pLocation )
     {
         throw_( pLocation, pMessage );
     }
diff --git a/sdext/source/pdfimport/tree/drawtreevisiting.cxx 
b/sdext/source/pdfimport/tree/drawtreevisiting.cxx
index 7897dbae9d08..e7586a0cf942 100644
--- a/sdext/source/pdfimport/tree/drawtreevisiting.cxx
+++ b/sdext/source/pdfimport/tree/drawtreevisiting.cxx
@@ -628,6 +628,7 @@ void DrawXmlOptimizer::visit( PageElement& elem, const 
std::list< std::unique_pt
         if (! pCurPara )  // new paragraph, insert one
         {
             pCurPara = ElementFactory::createParagraphElement( nullptr );
+            assert(pCurPara);
             // set parent
             pCurPara->Parent = &elem;
             //insert new paragraph before current element
diff --git a/sdext/source/pdfimport/tree/writertreevisiting.cxx 
b/sdext/source/pdfimport/tree/writertreevisiting.cxx
index 9012aaa21038..f7e1edb6a37d 100644
--- a/sdext/source/pdfimport/tree/writertreevisiting.cxx
+++ b/sdext/source/pdfimport/tree/writertreevisiting.cxx
@@ -707,6 +707,7 @@ void WriterXmlOptimizer::visit( PageElement& elem, const 
std::list< std::unique_
         if( ! pCurPara ) // new paragraph, insert one
         {
             pCurPara = ElementFactory::createParagraphElement( nullptr );
+            assert(pCurPara);
             // set parent
             pCurPara->Parent = &elem;
             //insert new paragraph before current element
diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx 
b/sdext/source/pdfimport/wrapper/wrapper.cxx
index 86c0d3cf806f..11932746aeb6 100644
--- a/sdext/source/pdfimport/wrapper/wrapper.cxx
+++ b/sdext/source/pdfimport/wrapper/wrapper.cxx
@@ -858,7 +858,7 @@ void Parser::parseLine( std::string_view aLine )
     const std::string_view rCmd = lp.readNextToken();
     const hash_entry* pEntry = PdfKeywordHash::in_word_set( rCmd.data(),
                                                             rCmd.size() );
-    OSL_ASSERT(pEntry);
+    assert(pEntry);
     switch( pEntry->eKey )
     {
         case CLIPPATH:

Reply via email to