cairo.h uses y0 and y1 (the names of standard math.h Bessel functions) as
function prototype argument names in several places, making gcc -Wshadow very
noisy and practically unusable for compilation of programs that use Cairo. I'm
attaching a patch that fixes that.
It is in fact a gcc problem, see
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=529, but even though it's fixed no
version of gcc with the fix has been released yet.
Created attachment 3190 [details] [review]
Fixing the headers is important, as they generate warnings for cairo users. The
C files are not really important, and your patch for them doesn't look right to
me as it only changes docs, not the parameters. I think we can just commit the
header changes, possibly update for any new API having y0 or y1 in the prototype.
Header files have to be fixed as they generate the warnings. gtk-doc
documentation has to match *header files*, not implementation. If the patch
does this -- as it seems to me -- it is correct. Of course, nothing prevents
one from changing the implementation too, it's a matter of taste how many
underscores one wants in the implementation.
A side note: since the release of gcc 4.1 which finally got it right patches
like this are becoming less relevant.
I'd prefer to just not uglify the cairo headers as a workaround for a gcc bug
that is now (finally) fixed.
*** Bug 7326 has been marked as a duplicate of this bug. ***