[cairo] Cairo 1.6 is imminent

Kalle Vahlman kalle.vahlman at gmail.com
Thu Apr 10 00:07:22 PDT 2008


2008/4/10, Carl Worth <cworth at cworth.org>:
> On Wed, 09 Apr 2008 15:34:02 -0700, Mathieu Lacage wrote:
>  > Usually, making the function parameter un-named gets rid of the warning.
>  > i.e.,
>  >
>  > void my_function (const char *)
>  > {
>  >   /* do stuff */
>  > }
>
>
> Oh, very nice. That's actually quite clean too. I'll do that (after
>  1.6).

GCC also has a variable attribute "unused" (available at least since
the 3-series) that does the trick, though not as cleanly of course.
Seems like GCC 3.x doesn't allow unnamed parameters[1], so if that's a
concern the attribute would be a better choice.

[1] With '-Wall -Wunused-parameter' for both 3.3 and 3.4 I get this:
wtest.c: In function `foo':
wtest.c:2: error: parameter name omitted

-- 
Kalle Vahlman, zuh at iki.fi
Powered by http://movial.fi
Interesting stuff at http://syslog.movial.fi


More information about the cairo mailing list