GNOME Bugzilla – Bug 150420
gdkgldrawable.h warnings with -Wshadow
Last modified: 2006-05-29 00:42:28 UTC
#include <unistd.h> #include <gtk/gtkgl.h> compile with gcc with -Wshadow. You get In file included from /usr/include/gtkglext-1.0/gdk/gdkgl.h:33, from /usr/include/gtkglext-1.0/gtk/gtkgl.h:22, from ../../libgwydgets/gwy3dview.h:33, from ../../libgwydgets/gwydgets.h:24, from something: /usr/include/gtkglext-1.0/gdk/gdkgldrawable.h:46: warning: declaration of `read' shadows a global declaration /usr/include/unistd.h:312: warning: shadowed declaration is here /usr/include/gtkglext-1.0/gdk/gdkgldrawable.h:54: warning: declaration of `read' shadows a global declaration /usr/include/unistd.h:312: warning: shadowed declaration is here this makes harder to use the gcc -Wshadow option to find shadowed declarations in one's own code. Gtk+ usually uses appends `_', i.e., renames the parameter to read_.
Created attachment 30757 [details] [review] A suggested patch A trivial patch.
There are also many instances of shadowed `index' in gdk/gdkglglext.h, that would be PITA to compile with -Wshadow. But it is generated thus not so straightforward to fix and fortunately I don't need it (yet?).
Since (a) no once cares (b) the release of gcc 4.1 will make this problem gradually go away by itself I am closing it as WONTFIX.