summaryrefslogtreecommitdiff
path: root/unusedcode.README
blob: e957238649822d6fbda9178adcba0fffd67e05eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
unusedcode.easy is generated via callcatcher[1] and filtered to remove some
tricky edge-cases (see Makefile), e.g. anything which could plausibly be
dlsymed or any symbol defined in an external library bundled into LibreOffice
which doesn't happen to get used by LibreOffice.

unusedcode.easy is generated on an x86_64 --enable-debug --enable-dbgutil
configuration.

Code listed as unused is code that gcc outputs but that nothing calls
(or takes the address of).

a) It's possible that some other platform or configuration uses the code,
   so manual inspection is always required.
b) At the time of writing the majority of unused code now originates via 
   macros, mostly from pre-STL containers, see [2] for killing two birds
   with one stone. These are typically methods of signatures...
	*::Insert
	*::Remove
	*::DeleteAndDestroy
	*::Replace
c) callcatcher ignores virtuals. But implementations of "pure virtuals"
   are not actually virtual methods. If something is declared pure virtual
   and provides an impl and that base-class impl is not explicitly called
   anywhere, then that impl can go away.
d) gcc will only emit code for inlines if those inlines are used, so
   sometimes something is listed correctly as unused but some inline
   code takes a pointer or reference to something which cannot be 
   instantiated so removal of some method/class fails at build time because
   gcc never emits any code for the unused inline but trips over it at
   compile time after an attempt at removal. i.e. generally the inline method
   can go as well because nothing calls it either, a double win.
e) if a constructor is listed as unused, and it's the *only* ctor in the class,
   then no object of that class can be constructed, so the whole thing is
   unused, which can lead to a whole cascade of tricky but logical fallout.
f) if a destructor is listed as unused, and a constructor isn't, then there's
   a leak somewhere, and the destructor most likely *should* be called.
g) there's more actually unused code then what's listed. The idea is that what's
   listed is definitely unused under the generation configuration, not that
   it's a list of all unused code. If the count of unused easy hits 0 then
   we can have a look at the non-easy and if that hits 0, then strip out
   code from the "release" binaries which only makes sense in debug/dbgutil
   configurations, and then tackle unused virtual method slots :-)

Symbols that are known to be false alarms are listed in: unusedcode.exclude

[1] http://www.skynet.ie/~caolan/Packages/callcatcher.html
[2] https://bugs.libreoffice.org/show_bug.cgi?id=38832
rk?h=libreoffice-3-5-2&id=36641fb421240ec5763d7d1f7fba05f5834b38d8'>update comparedocument and showtrackchanges iconandreas kainz 2017-04-04Make HangingIndent a commandSzymon Kłos 2017-03-24update notebook icon now it work without backgroundandreas kainz 2017-03-24fix annotation iconandreas kainz 2017-03-22update brows and printlayout iconsandreas kainz 2017-03-19Notebookbar: transparent icon for breeze_darkSzymon Kłos 2017-03-19update page breeze iconsandreas kainz 2017-03-19add titlepagedialog breeze iconandreas kainz 2017-03-19add tablenumberformatdialog icon for 32px Breeze sizeandreas kainz 2017-03-19add entirecell for 32pxandreas kainz 2017-03-19update showtrackedchanges icon with addwatchandreas kainz 2017-03-19add savemodified_extralarge icon to breezeandreas kainz 2017-03-04add missing Breeze-icons for tabed toolbarandreas kainz 2017-02-21add notebookbar icon to the breeze icon themeandreas kainz 2017-02-21Breeze-icons: make the pdf icons monochromeandreas kainz 2017-01-04split SV_RESID_BITMAP_MSGBOX upCaolán McNamara 2016-12-22drop imglstCaolán McNamara 2016-12-22move na stragglers to resCaolán McNamara 2016-12-22unwind RID_IMAGELIST_NAVCONT ImageListCaolán McNamara 2016-12-21drop GetImageManager use in sc and unwind ImageListCaolán McNamara 2016-12-20unroll IL_VALUES ImageListCaolán McNamara 2016-12-12remove another imagelistCaolán McNamara 2016-12-12update png locations for various imagelist unwindingsCaolán McNamara 2016-12-12remove another imagelistCaolán McNamara 2016-12-05unroll IMG_NAVI_ENTRYBMP ImageListCaolán McNamara 2016-11-06add breeze icons and update fr* and pr* sheet iconsandreas_k 2016-11-01remove red alert color from pdf iconandreas_k 2016-11-01quit icons in breeze-dark were shown in black instead of redandreas_k 2016-11-01update icon to have the right icon color in breeze-darkandreas_k 2016-11-01update calc icon now the calc icon is green instead of blackandreas_k 2016-10-26add toggletabbarvisibility for breeze and breeze_darkandreas_k 2016-10-09tdf#86472 Fix breeze borders and set breeze_dark fallbackYousuf Philips 2016-09-29Page margin popup converted to use outside sidebarSzymon Kłos 2016-09-13Breeze Dark icons for use on dark themesAndreas Kainz