[Libreoffice] [PATCH] Removed nonexistent items from unusedcode.easy

Caolán McNamara caolanm at redhat.com
Mon Jan 23 05:35:23 PST 2012


On Sun, 2012-01-22 at 11:41 +0100, Mariusz Dykierek wrote:
> Hi,
> 
> Attached patch removes from "unusedcode.easy" a number of methods that cannot be found in the
> sources within the "core" directory.
> 
> Can someone more experienced than I am confirm that items:
>  - CIcc*::*
>  - boost::gregorian::*
> are really supposed to be enumerated in the "unusedcode.easy"?

If we manually remove them, then they'll just "come back" the next time
I run make findunusedcode.

The CIcc* stuff is in icc, but unpacked during the build as an external
module. The other ones are in boost, which is a similar situation. Atom*
in libcmis. So those contain stuff which we build but don't call.
Arguably we could tweak the makefiles and or patch them to only build
the stuff we actually use for a faster build and smaller install set. 

We don't include the boost libs or icc libs into our install set, so
those don't bloat anything, and its too painful to customize libcmis to
cut out the methods we do use, so I've now added them to the filter in
solenv/gbuild/extensions/postBuiltplTargets.mk to filter those out.

Stuff like "LinkStubClickLightHdl" and various others are actually there
in the code, except created from DECL_LINK IMPL_LINK macros. Sometimes
they can be converted from LINKs to normal methods as the wrapped
methods *is* called directly while the wrapper is unused. And sometimes
the wrapper and wrappee are both unused.

FWIW, as an example Svx3DWin::LinkStubClickLightHdl is 
svx/inc/svx/float3d.hxx as DECL_LINK( ClickLightHdl, PushButton * ); and
svx/source/engine3d/float3d.cxx as IMPL_LINK( Svx3DWin, ClickLightHdl,
PushButton*, pBtn ) but the LINK wrapper is unused, even though there is
a direct call to ClickLightHdl( pBtn ); so this can be changed to
something like...

-IMPL_LINK( Svx3DWin, ClickLightHdl, PushButton*, pBtn )
+void Svx3DWin::ClickLightHdl(PushButton* pBtn)
{
}

-DECL_LINK( ClickLightHdl, PushButton * );
+void ClickLightHdl(PushButton *);

C.



More information about the LibreOffice mailing list