diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2024-11-13 16:34:05 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2024-11-13 20:13:02 +0100 |
commit | aa60d9a5af195438afe4aaad5838e78df307cf05 (patch) | |
tree | fb41afea1c86050c5379c6aff6d99106dd685afd /svl/source | |
parent | 6570d5600918c07a4f54b86b1f52e6c4d1964f0c (diff) |
tdf#163486: PVS: variable is used after being declared
V614 The 'pReturn' smart pointer is utilized immediately after being declared or reset. It is suspicious that no value was assigned to it.
V614 The 'pReturn' smart pointer is utilized immediately after being declared or reset. It is suspicious that no value was assigned to it.
Change-Id: Ic84af8c395c4b3f86017eb83be17a6fbd628e5d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176553
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
Diffstat (limited to 'svl/source')
-rw-r--r-- | svl/source/items/stylepool.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/svl/source/items/stylepool.cxx b/svl/source/items/stylepool.cxx index af7b9fb6e874..4d89fc680086 100644 --- a/svl/source/items/stylepool.cxx +++ b/svl/source/items/stylepool.cxx @@ -228,8 +228,7 @@ namespace { } } - std::shared_ptr<SfxItemSet> pReturn; - return pReturn; + return std::shared_ptr<SfxItemSet>(); } class Iterator @@ -285,7 +284,6 @@ namespace { std::shared_ptr<SfxItemSet> Iterator::getNext() { - std::shared_ptr<SfxItemSet> pReturn; while( mpNode || mpCurrParent != maParents.end() ) { if( !mpNode ) @@ -315,7 +313,7 @@ namespace { return mpNode->getItemSetOfIgnorableChild( mbSkipUnusedItemSets ); } } - return pReturn; + return std::shared_ptr<SfxItemSet>(); } } |