openoffice-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Don Lewis <>
Subject Re: compiler warnings when building OpenOffice
Date Thu, 01 Sep 2016 23:00:12 GMT
On  1 Sep, Patricia Shanahan wrote:
> I need a problem to work on. Would you like me to take a particular 
> compiler warning and try to sort it out?

Here is one:

warning: 'osl_detail_ObjectRegistry_getMutex' has C-linkage specified, but returns user-defined
type '::osl::Mutex &' which is incompatible with C [-Wreturn-type-c-linkage]

In sal/inc/osl/diagnose.hxx,
  ::osl::Mutex & SAL_CALL osl_detail_ObjectRegistry_getMutex()
is declared inside an extern "C" block, so it should have C linkage, but
it is returning a reference, which is a C++ thing.

The obvious fix would seem to be to move it out of the extern "C" block,
but I don't know what to do about the SAL_THROW_EXTERN_C() part of the

Another one is -Woverloaded-virtual which has a number of instances.
These are the top three in terms of warning count (due to repeats):

main/solver/420/ warning: 'cppu::WeakComponentImplHelper4<com::sun::star::accessibility::XAccessible,
com::sun::star::accessibility::XAccessibleContext, com::sun::star::accessibility::XAccessibleEventBroadcaster,
com::sun::star::lang::XServiceInfo>::addEventListener' hides overloaded virtual function

main/solver/420/ warning: 'cppu::WeakComponentImplHelper4<com::sun::star::accessibility::XAccessible,
com::sun::star::accessibility::XAccessibleContext, com::sun::star::accessibility::XAccessibleEventBroadcaster,
com::sun::star::lang::XServiceInfo>::removeEventListener' hides overloaded virtual function

main/solver/420/ warning: 'canvas::GraphicDeviceBase<canvas::BaseMutexHelper<cppu::WeakComponentImplHelper9<com::sun::star::rendering::XSpriteCanvas,
com::sun::star::rendering::XIntegerBitmap, com::sun::star::rendering::XGraphicDevice, com::sun::star::lang::XMultiServiceFactory,
com::sun::star::rendering::XBufferController, com::sun::star::awt::XWindowListener, com::sun::star::util::XUpdatable,
com::sun::star::beans::XPropertySet, com::sun::star::lang::XServiceName> >, vclcanvas::SpriteDeviceHelper,
vclcanvas::tools::LocalGuard, cppu::OWeakObject>::disposing' hides overloaded virtual function

I'm not sure if there is really a problem here or if the warning is

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message