[Libreoffice] easy-hacks: removing unused code, now a lot easier

Caolán McNamara caolanm at redhat.com
Mon Jul 11 02:03:21 PDT 2011


So. I got callcatcher up and running for the LibreOffice environment
properly now.

There is now a list in "unusedcode.easy" in the root of the source tree
of functions/methods in LibreOffice which are non-virtual methods which
under Linux debug mode are neither called, nor have their address taken.
i.e. complied, but unused code which would be strong candidates for
removal


A) I've restricted the list to class member functions, and so excluded
functions which could reasonably be dlsymed, to keep things simple and
avoid listing a number of tricky functions which are dlsymed here and
there. If the list count hits 0, I'll reenable those and whitelist out
the functions with non-standard entry points
B) Some methods are simply not used anywhere, and some are used only
under some ifdefs, e.g. defined on all platforms, but only used on one.
Or defined under all build configurations, but only used in debugging
mode. So in those circumstances the remedial action is to put the code
inside the same ifdefs as their consumers.
C) I'll update the list every now and then, easiest thing to do in
between runs is to remove the entry from the list manually if you
remove/fix an unused method.

Easy-hack for the easy-hack is to do whatever is the current way to
update/add easy-hacks to add this to the list

C.



More information about the LibreOffice mailing list