diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2019-04-01 00:25:16 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2019-04-01 00:49:12 +0200 |
commit | 85456fae54029edd26df2277a9eec5e2fe3d9739 (patch) | |
tree | fd55ad48b34c66f0b839edcbc952a8a5a0752c72 /unodevtools/source/skeletonmaker/cpptypemaker.cxx | |
parent | 1d35b89e7581e12024769d19bfb6d6eb2c3274b8 (diff) |
tdf#120703 PVS: Silence V522 warnings
V522 There might be dereferencing of a potential null pointer.
Change-Id: Ie617b41a8f8d334022cf5313b242a236baedba48
Reviewed-on: https://gerrit.libreoffice.org/70017
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'unodevtools/source/skeletonmaker/cpptypemaker.cxx')
-rw-r--r-- | unodevtools/source/skeletonmaker/cpptypemaker.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/unodevtools/source/skeletonmaker/cpptypemaker.cxx b/unodevtools/source/skeletonmaker/cpptypemaker.cxx index 21c336ba02ad..92a2db00c4b5 100644 --- a/unodevtools/source/skeletonmaker/cpptypemaker.cxx +++ b/unodevtools/source/skeletonmaker/cpptypemaker.cxx @@ -64,8 +64,9 @@ static void printType( if (defaultvalue && referenceType == 16) { if (sort == codemaker::UnoType::Sort::Enum) { + assert(dynamic_cast<unoidl::EnumTypeEntity *>(entity.get())); o << nucleus.copy(nucleus.lastIndexOf('.') + 1) << "_" - << dynamic_cast< unoidl::EnumTypeEntity * >(entity.get())-> + << static_cast<unoidl::EnumTypeEntity*>(entity.get())-> getMembers()[0].name; } return; @@ -926,9 +927,10 @@ void generateDocumentation(std::ostream & o, o << "; construction methods:\n"; printConstructors(o, options, manager, nucleus); } + assert(dynamic_cast<unoidl::SingleInterfaceBasedServiceEntity*>(entity.get())); generateDocumentation( o, options, manager, - u2b(dynamic_cast< unoidl::SingleInterfaceBasedServiceEntity * >( + u2b(static_cast<unoidl::SingleInterfaceBasedServiceEntity*>( entity.get())->getBase()), delegate); break; |