[Libreoffice] unusedcode.easy and debug build
Caolán McNamara
caolanm at redhat.com
Mon Aug 29 02:14:00 PDT 2011
On Sat, 2011-08-27 at 02:04 +0200, Markus Mohrhard wrote:
> Hello Caolan, all,
>
> I just had some problems with my debug build in ucb and discovered
> that at least one method only needed in a debug build has been
> removed. It seems it was mentionend on unusedcode.easy, so my question
> is how we should deal with these cases.
Yeah, the unusedcode.easy list is generated on an x86_64 Linux
--enable-dbgutil configuration, so code only used under higher debug
levels appears, as does code that is e.g. platform/different
configuration specific.
Like sb says, the typical solution is to put the definition/declaration
of the code behind the same ifdefs as the uses. And in this specific
case it looks sort of useless anyway so can just fix the assert.
Removing the lines from the list doesn't help, as I regenerate the list
regularly. Similar issue arises with "cool code that we'll use soon, but
not yet". Normally soon never happens :-) but if someone wants to
protect their code from getting removed stick ifdef TOMORROW or
something around it which has the desired outcome of not including the
unused code in the final build.
C.
More information about the LibreOffice
mailing list