diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-07-22 13:50:48 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-07-23 07:53:20 +0200 |
commit | eaf55518621b1fe08a60aec98b4367d7ad722cb9 (patch) | |
tree | 6e5e369e98719f705442914c63a442d77d5dbcc2 /unodevtools/source/skeletonmaker | |
parent | d8270636a57e7dc68ede51308c380e2098f765d7 (diff) |
Silence GCC 11 trunk -Werror=nonnull involving dynamic_cast
...where the compiler now warns that the implicit this pointer argument could be
null in a member function call made via a dynamic_cast-converted pointer (and
where the code apparently relies on the dynamic_cast not to fail)
Change-Id: I79482f4a853b6b47c5f9dd099a4e8377a19f7b0d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99219
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'unodevtools/source/skeletonmaker')
-rw-r--r-- | unodevtools/source/skeletonmaker/cpptypemaker.cxx | 4 | ||||
-rw-r--r-- | unodevtools/source/skeletonmaker/javatypemaker.cxx | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/unodevtools/source/skeletonmaker/cpptypemaker.cxx b/unodevtools/source/skeletonmaker/cpptypemaker.cxx index 14304c4761ff..b7b4f4a7c0ec 100644 --- a/unodevtools/source/skeletonmaker/cpptypemaker.cxx +++ b/unodevtools/source/skeletonmaker/cpptypemaker.cxx @@ -952,8 +952,8 @@ void generateDocumentation(std::ostream & o, o << "; get method:\nstatic "; printType( o, options, manager, - dynamic_cast< unoidl::InterfaceBasedSingletonEntity * >( - entity.get())->getBase(), + dynamic_cast< unoidl::InterfaceBasedSingletonEntity & >( + *entity).getBase(), 1); o << " get(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & context);\n"; break; diff --git a/unodevtools/source/skeletonmaker/javatypemaker.cxx b/unodevtools/source/skeletonmaker/javatypemaker.cxx index f88530ecb316..ea373dac520e 100644 --- a/unodevtools/source/skeletonmaker/javatypemaker.cxx +++ b/unodevtools/source/skeletonmaker/javatypemaker.cxx @@ -816,8 +816,8 @@ void generateDocumentation(std::ostream & o, printConstructors(o, options, manager, nucleus); generateDocumentation( o, options, manager, - u2b(dynamic_cast< unoidl::SingleInterfaceBasedServiceEntity * >( - entity.get())->getBase()), + u2b(dynamic_cast< unoidl::SingleInterfaceBasedServiceEntity & >( + *entity).getBase()), delegate); break; @@ -837,8 +837,8 @@ void generateDocumentation(std::ostream & o, o << "; get method:\npublic static "; printType( o, options, manager, - dynamic_cast< unoidl::InterfaceBasedSingletonEntity * >( - entity.get())->getBase(), + dynamic_cast< unoidl::InterfaceBasedSingletonEntity & >( + *entity).getBase(), false); o << " get(com.sun.star.uno.XComponentContext context);\n"; break; |