[gcompris-devel] Performance issues
Terje Bergström
terje at terje.fi
Tue Oct 2 14:26:15 UTC 2007
On Tuesday 02 October 2007 07:59:59 Terje Bergström wrote:
> On 10/1/07, Bruno Coudoin <bruno.coudoin at free.fr> wrote:
> > I get a warning and we don't accept them:
> > 916: warning : declaration without effect
> The macro expands to a function call, not a declaration, so I'm not
> entirely sure what this warning means or how to fix it.
This warning is not produced in sbox-arm-linux-gcc (GCC) 3.4.4 (release)
(CodeSourcery ARM 2005q3-2). Just to make sure, here's the part in gcompris.c
we're talking about:
/* FIXME: HACK Needed or we have unresolved symbols at python plugin dlopen
* Is there a better way to fix these?
*/
GnomeCanvasItem *dummy = NULL;
GNOME_IS_CANVAS_POLYGON(dummy);
GNOME_IS_CANVAS_CLIPGROUP(dummy);
GNOME_IS_CANVAS_BPATH(dummy);
GNOME_TYPE_CANVAS_POLYGON;
We do -Werror in maemo, too, any warnings would prevent building. Perhaps this
would solve the problem:
/* FIXME: HACK Needed or we have unresolved symbols at python plugin dlopen
* Is there a better way to fix these?
*/
GnomeCanvasItem *dummy = NULL;
GNOME_IS_CANVAS_POLYGON(dummy);
GNOME_IS_CANVAS_CLIPGROUP(dummy);
GNOME_IS_CANVAS_BPATH(dummy);
GType type = GNOME_TYPE_CANVAS_POLYGON;
type = type;
If new gcc is noticing that we're calling a const function that doesn't have
any input and we discard the result, saving the result should fix the
warning. The second type=type is to prevent "unused variable" errors for
type.
And no, I don't like the hack either. :-)
> > It doesn't matter in our case unless the optimizer is so good that it
> > find out that this code is useless and strip it. It worked for me without
> > volatile.
> Ok, I'll try.
I checked and volatile doesn't make any difference, so that can be removed.
Terje
More information about the Gcompris-devel
mailing list