[Libreoffice-commits] .: 9 commits - boost/boost_1_44_0-logical-op-parentheses.patch boost/boost_1_44_0-unused-parameters.patch boost/makefile.mk cppcanvas/source framework/source sc/qa sc/source vcl/inc vcl/ios

Lubos Lunak l.lunak at suse.cz
Wed Apr 4 08:47:52 PDT 2012

On Wednesday 04 of April 2012, Tor Lillqvist wrote:
> commit 2b00b0e0a1a47c3d174ee9e86826b60a356f3dbf
> Author: Tor Lillqvist <tml at iki.fi>
> Date:   Tue Apr 3 23:45:26 2012 +0300
>     WaE: call to pure virtual member function
> diff --git a/framework/source/classes/menumanager.cxx
> b/framework/source/classes/menumanager.cxx index 4b0af60..202b7eb 100644
> --- a/framework/source/classes/menumanager.cxx
> +++ b/framework/source/classes/menumanager.cxx
> @@ -146,8 +146,14 @@ MenuManager::MenuManager(
>      m_xFrame            = rFrame;
>      m_bInitialized      = sal_False;
>      m_bIsBookmarkMenu   = sal_False;
> +#ifdef LIBO_WERROR
> +    // Wtf? Clang says: call to pure virtual member function
> +    // 'acquire'; overrides of 'acquire' in subclasses are not
> +    // available in the constructor of 'XInterface'

 This is 
(or http://www.artima.com/cppsource/nevercall.html if you want it in more 
detail, although the 'never' is a bit far-fetched, it is well-defined what 

> +    assert(!"Call to pure virtual member function");
> +#else
>      SAL_STATIC_CAST( ::com::sun::star::uno::XInterface*,
> (OWeakObject*)this )->acquire(); -
> +#endif

 However this appears to a Clang bug, in that it reports an incorrect warning, 
probably it gets confused by the casts. I cannot actually trigger this code 
to run, but in my small testcase, code like this generated the warning, but 
worked normally. So I expect that whenever somebody actually reaches this 
code, this will assert needlessly.

 I'm not sure what the proper fix would be though, as the class apparently 
inherits from XInterface in 3 different ways, and I wonder what the point of 
the explicit casts is. I'll go with thinking the casts are pointless historic 
garbage and try plain call to acquire(), it shouldn't make it worse.

 Lubos Lunak
 l.lunak at suse.cz

More information about the LibreOffice mailing list