xresgrind

May 21st, 2009 by Caolán

So, “xresgrind”, my unholy overkill union of valgrind with X Pixmap/Window/etc. tracking lurched to life earlier. Checking it against OOo to see if it would have been able to automatically detect the dread pixmap leak of i85321 (which is long fixed, just re-introduced it locally to have a look-see) shows the expected correct results of…

==13354== Resource 0x46002fb of class 2 never released, acquired at
==13354==    at 0x400E2A6: XCreatePixmap (xr_intercepts.c:255)
==13354==    by 0x6D971F7: ???
==13354==    by 0x548154F: SalGraphics::DrawAlphaBitmap(SalTwoRect const&, SalBitmap const&, SalBitmap const&, OutputDevice const*) (salgdilayout.cxx:793)
==13354==    by 0x541322D: OutputDevice::ImplDrawAlpha(Bitmap const&, AlphaMask const&, Point const&, Size const&, Point const&, Size const&) (outdev2.cxx:1983)
==13354==    by 0x5413CF8: OutputDevice::ImplDrawBitmapEx(Point const&, Size const&, Point const&, Size const&, BitmapEx const&, unsigned long) (outdev2.cxx:891)
==13354==    by 0x54141FA: OutputDevice::DrawBitmapEx(Point const&, Size const&, Point const&, Size const&, BitmapEx const&) (outdev2.cxx:788)
==13354==    by 0x53E1C6E: ImplImageBmp::Draw(unsigned short, OutputDevice*, Point const&, unsigned short, Size const*) (impimage.cxx:550)
==13354==    by 0x54145B7: OutputDevice::DrawImage(Point const&, Image const&, unsigned short) (outdev2.cxx:1204)

Cool :-)

DEV300_m48

May 13th, 2009 by Caolán

DEV300_m48 callcatcher results. xml2cmp now unused method free, on the other hand svx has 35 new unused methods after the new code shuffle in that area

Messing with the Java Brand

May 2nd, 2009 by Caolán

Sun Java Desktop System (*)

Baigent: “The #9 Reason that Sun is Setting: Messing with the Java Brand: … the ill-fated Sun Java Desktop System … [it] was no more about Java than is Mac OS X (which, like JDS, contains a Java SE runtime)”

Yup, that was about the time I left Sun, rather gladly as there was clearly some

‘When I use a word,’ Humpty Dumpty said, in a rather scornful tone,’ it means just what I choose it to mean, neither more nor less.’

going on. It was a totally inane name, the Sun Java Desktop System simply wasn’t a Java desktop system, everyone knew it, nailing the word Java onto everything whether it had anything to do with Java or not was fingernail-pullingly painful. It should have been shot down by an independent advertising watchdog :-)

*Contains only trace elements of Java

DEV300_m47

May 2nd, 2009 by Caolán

DEV300_m47 results, down 98 methods as bfshrink02 and sb109 get integrated, stoc, cppuhelper and configmgr no longer have any unused methods. binfilter’s unused list shrinks to effectively unused destructors which indicate leaks rather than code to be removed. sc continues to increase however. xml2cmp stuff will get removed in cmcfixes57.

The pap language code refers to both of the Papiamentu/Papiamento dialects, whose spelling differs. Of the major three islands speaking it we have:
Papiamentu
+ Curaçao
+ Bonaire
Papiamento
+ Aruba
Where, Aruba is a former Netherlands Antilles territory with an assigned territory code of “AW”, and the other two are current (for the moment anyway) Netherlands Antilles territories which has an assigned territory code of “AN”, so the glibc locale of pap_AN presumably should best be used to indicate the Papiamentu dialect rather than Papiamento

ternary operator blues

April 15th, 2009 by Caolán

ISO/IEC 9899:TC3 Committee Draft — Septermber 7, 2007 WG14/N1256

6.5.15 Conditional operator

If both the second and third operands have arithmetic type, the result type that would be determined by the usual arithmetic conversions, were they applied to those two operands, is the type of the result.

i.e.

#include <stdio.h>

void SetLong (long foo)
{
    fprintf(stderr, "Got a long of %ld\n", foo);
}

int main(void)
{
    int a = -10;
    unsigned int b = 10;

    /*int converted to long*/
    SetLong( a );
    /*unsigned int converted to long*/
    SetLong( b );
    /* int and unsigned int results converted to unsigned int,
       unsigned int then converted to long. i.e. totally different
       from if (1) SetLong(a); else SetLong(b); */
    SetLong( 1 ? a : b );

    return 0;
}

On 32bit Linux long and int are the same size, so it doesn’t matter and we get -10, 10, -10, on 64bit they’re not and so results in -10, 10 and 4294967286

DEV300_m46

April 13th, 2009 by Caolán

DEV300_m46 callcatcher results, +32 to 1181 unused methods. (as against that, binfilter and chart2 have pending workspaces to strip them of a pile of methods)

casual code annotation

April 10th, 2009 by Caolán

I want a sort of casual code annotation wiki-thing where I can annotate code in passing without having to check it in to a formal source repository,

DEV300_m44

March 23rd, 2009 by Caolán

Down 18 methods in DEV300_m44 to 1148 baddies.

DEV300_m43

March 12th, 2009 by Caolán

latest DEV300_m43 callcatcher report, +83 unused methods, 55 of which are in the new formula UI library

DEV300_m42

February 25th, 2009 by Caolán

DEV300_m42 callcatcher results are available. Back up to over 1000 unused methods. sd contains a fifth of all unused methods. i18npool has picked up two new unused destructors, seeing as the constructors are used, there’s probably a leak in there with missing deletes against news. On the bright side, unoxml and sax are now unused method free.

DEV300_m40/DEV300_m41

February 2nd, 2009 by Caolán

callcatcher DEV300_m40 and in rapid succession, DEV300_m41 results.

sdext stripped of the majority of unused methods, so we’re now down under 900. Biggest win remains sd with 195 methods.

since rene’s work is in place, now in DEV300_m40+ OOo can be built with a simple
./configure
make

DEV300_m39, a note on pure virtuals

January 22nd, 2009 by Caolán

DEV300_m39 callcatcher report. Couple of modules go down, a couple go up. Balances out to retain 927 unused methods. The top three offenders remain sd, writerfilter and sc.

Note that if a method declared as pure virtual in class X then if an implementation of that method in class X is provided then it *does not* get called through the vtable, i.e. the body of that method is effectively a non-virtual method, to get called it has to be explicitly called somehow.

So that means that callcatcher is correct if it reports that a pure virtual method is unused. Virtual methods are ignored, but implementations of base-class pure virtuals are a different kettle of fish and can themselves be treated as non-virtuals.

class foo
{
public:
virtual void bar() = 0;
};

//Can only get called by an explicit call of foo::bar() on some concrete subclass of abstract superclass foo
void foo::bar()
{
//something
}

DEV300_m38

January 5th, 2009 by Caolán

The DEV300_m38 callcatcher results, now with added inline deltas niftyness to show which are the new unused methods since the last run. Overall increase of +5 methods since m37.

Freya II

December 18th, 2008 by Caolán

Freya II
So now what am I supposed to do

DEV300_m36 callcatcher report

November 26th, 2008 by Caolán

Back up to 927 unused methods in m36 vs 922 in m35

err…, ok

November 12th, 2008 by Caolán


if ( nSlotId != SID_OBJECT_SELECT &&
(/* bTempRotation && */ nMarkCount==0) ||
( mpView->GetDragMode() == SDRDRAG_CROOK &&
!mpView->IsCrookAllowed( mpView->IsCrookNoContortion() ) ) ||
( mpView->GetDragMode() == SDRDRAG_SHEAR &&
!mpView->IsShearAllowed() && !mpView->IsDistortAllowed() ) ||
( nSlotId==SID_CONVERT_TO_3D_LATHE && pSingleObj &&
(pSingleObj->GetObjInventor() != SdrInventor ||
pSingleObj->GetObjIdentifier() == OBJ_MEASURE) ) )

fabulous if statement

November 11th, 2008 by Caolán


if((nTypeId == TYP_DDEFLD && pFldType->Which() == RES_DDEFLD) ||

(nTypeId == TYP_USERFLD && nWhich == RES_USERFLD) ||

(nTypeId == TYP_GETFLD && nWhich == RES_SETEXPFLD &&
!(((SwSetExpFieldType*)pFldType)->GetType() & nsSwGetSetExpType::GSE_SEQ)) ||

(nTypeId == TYP_SETFLD && nWhich == RES_SETEXPFLD &&
!(((SwSetExpFieldType*)pFldType)->GetType() & nsSwGetSetExpType::GSE_SEQ)) ||

(nTypeId == TYP_SEQFLD && nWhich == RES_SETEXPFLD &&
(((SwSetExpFieldType*)pFldType)->GetType() & nsSwGetSetExpType::GSE_SEQ)) ||

((nTypeId == TYP_INPUTFLD || nTypeId == TYP_FORMELFLD) &&
(nWhich == RES_USERFLD ||
nWhich == RES_SETEXPFLD &&
!(((SwSetExpFieldType*)pFldType)->GetType() & nsSwGetSetExpType::GSE_SEQ)) ) )
{

DEV300_m34 report

October 24th, 2008 by Caolán

The DEV300_m34 report, shows another drop from 1008 to 920 unused methods as mba’s workspace comes through to reduce framework and similar modules. Top 4 modules account for more than 50% of remaining low-hanging fruit

DEV300_m33

October 9th, 2008 by Caolán

Unused methods dipped from 1411 to 1008 as most unused chart2 methods are removed, and a big pile of sc ones. leaving sd as the new leader module.

DEV300_m30

September 3rd, 2008 by Caolán

The unused method listings are updated for every release, i.e. the latest DEV300_m30.

The current un-integrated patches are listed here, with the largest set of unused code in sc scheduled for removal in workspace koheicoderemoval