Re: AbiWord on Linux/Alpha


Subject: Re: AbiWord on Linux/Alpha
sterwill@abisource.com
Date: Wed Feb 09 2000 - 10:40:09 CST


abnay@altavista.net wrote:
> If you think I am missing something kindly point
> it out with an example.

I use all of GTK+ as an example. If you would like to redesign
GTK+ to use variable parameter callback skeletons for every signal
and event, we can stop UT_ASSERT'ing the "self" and state variables
on each callback that we don't really need for the event.

Of course we can comment out the variables we are not using, like:

static gint someCallback(GtkWidget * /* widget*/ , GtkGoodData e, void * obj)
{
        // Not needed without widget pointer
        // UT_ASSERT (widget && obj);

        UT_ASSERT(obj);

        (SomeAbiWordClass *)(obj)->triggerFunc(e);
        return FALSE;
}

... but then we lose the ASSERT on the "widget" variable, which is often
nice to check. It really has stopped me right in the debugger _before_
a segmentation fault happens (if "widget" is bogus, chances are "e"
and "obj" are not valid for the context either).

Here's my suggest: Go to abi/src/config/platforms/[yourunix].mk and
take out the "-W" flag to the compiler. Rebuild and see if many of these
nasty warnings are still there.

-- 
Shaw Terwilliger



This archive was generated by hypermail 2b25 : Wed Feb 09 2000 - 10:40:10 CST