Bug 7326

Summary: Compiling with gcc -Wshadow and <math.h> results in warnings
Product: cairo Reporter: Erik de Castro Lopo <erikd+cairo>
Component: generalAssignee: Carl Worth <cworth>
Status: RESOLVED DUPLICATE QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: high    
Version: 1.0.4   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Erik de Castro Lopo 2006-06-25 15:23:58 UTC
> cat test.c
#include <math.h>
#include <cairo.h>

int main (void)
{
        return 0 ;
}
> gcc -Wshadow `pkg-config --cflags --libs cairo` test.c 
In file included from test.c:2:
/usr/include/cairo/cairo.h:443: warning: declaration of 'y1' shadows a global
declaration
/usr/include/bits/mathcalls.h:242: warning: shadowed declaration is here
/usr/include/cairo/cairo.h:538: warning: declaration of 'y1' shadows a global
declaration
/usr/include/bits/mathcalls.h:242: warning: shadowed declaration is here
/usr/include/cairo/cairo.h:543: warning: declaration of 'y1' shadows a global
declaration
/usr/include/bits/mathcalls.h:242: warning: shadowed declaration is here
/usr/include/cairo/cairo.h:1257: warning: declaration of 'y0' shadows a global
declaration
/usr/include/bits/mathcalls.h:241: warning: shadowed declaration is here
/usr/include/cairo/cairo.h:1258: warning: declaration of 'y1' shadows a global
declaration
/usr/include/bits/mathcalls.h:242: warning: shadowed declaration is here
/usr/include/cairo/cairo.h:1325: warning: declaration of 'y0' shadows a global
declaration
/usr/include/bits/mathcalls.h:241: warning: shadowed declaration is here

I like to use -Wshadow *and* -Werror on all my stuff but I can't do that
if I'm using cairo.
Comment 1 Carl Worth 2006-06-25 16:20:00 UTC

*** This bug has been marked as a duplicate of 4379 ***

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.