diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-05-11 21:30:31 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-05-12 14:05:24 +0200 |
commit | db6f4c29ad2cb5cef009f78bbe6387a9e65a45a6 (patch) | |
tree | e75212a08a5a1e0dbb7405483287c9b7f2628dc1 /sdext/source/pdfimport | |
parent | b4eda68181eb422f4e58e4dccd93b1d9165afff8 (diff) |
WaE: C6011 Dereferencing NULL pointer warnings
Change-Id: I83952aef1fd44d2b49cbaa2324283c14c83723de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167522
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'sdext/source/pdfimport')
-rw-r--r-- | sdext/source/pdfimport/pdfparse/pdfparse.cxx | 2 | ||||
-rw-r--r-- | sdext/source/pdfimport/tree/drawtreevisiting.cxx | 1 | ||||
-rw-r--r-- | sdext/source/pdfimport/tree/writertreevisiting.cxx | 1 | ||||
-rw-r--r-- | sdext/source/pdfimport/wrapper/wrapper.cxx | 2 |
4 files changed, 4 insertions, 2 deletions
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: |