[PUSHED 4/4] Re: [PATCH 0/4] Remove some unused methods

Michael Stahl mstahl at redhat.com
Mon Feb 6 16:26:18 PST 2012

On 06/02/12 23:05, Greg Kroah-Hartman wrote:
> Here are 4 patches removing some unused methods in the tree.
> All of these patches are contributed under the LGPLv3+ / MPL.


> Note, I also removed the line in the unusedcode.easy file at the same
> time, if I shouldn't have done that, let me know and I'll redo these
> patches.

doesn't matter too much as that will get updated anyway next time
callcatcher tool is run.
(also, unusedcode.easy only shows the situation on Linux, see below...)

> If I messed anything up, or the patches need more information within the
> body of the changelog, please let me know, and I'll be glad to respin
> them.
> thanks,
> greg k-h

these "tools" things are wicked, and have traps prepared for the unwary;
it turns out that both DirEntry::GetDevice() and FileStat::FileStat(void
const*) have 2 implementations, and the WNT one is actually used in
WNT-only code:

> tools/source/fsys/dirent.cxx:        aFromDevice=aFromDevice.GetDevice();
> tools/source/fsys/dirent.cxx:        aToDevice=aToDevice.GetDevice();

> tools/source/fsys/wntmsc.cxx:            pTemp->ImpSetStat( new FileStat( (void*) pDosDir ) );
> tools/source/fsys/wntmsc.cxx:                FileStat *pNewStat = new FileStat( (void*) pDosDir );

(and one of these is inside an "#ifdef FEAT_FSYS_DOUBLESPEED" ... you
can't make these things up i guess...)

so i've only applied and pushed the part of these patches that removes
the Unix implementation (that should hopefully deter people from adding
new callers...); please try to be more careful next time (though
admittedly checking that generally is a PITA given how name lookup works
in C++)

patches to remove the tools/fsys trainwreck completely and adapt callers
to use osl/file.hxx would be appreciated of course :)

thanks for the patches,

PS: in case you wanted the free t-shirt as the 400th contributor i'm
afraid you're probably too late :-P

More information about the LibreOffice mailing list