After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 150420 - gdkgldrawable.h warnings with -Wshadow
gdkgldrawable.h warnings with -Wshadow
Status: RESOLVED WONTFIX
Product: gtkglext
Classification: Other
Component: general
1.0.x
Other Linux
: Normal minor
: Future
Assigned To: Naofumi Yasufuku
Naofumi Yasufuku
Depends on:
Blocks:
 
 
Reported: 2004-08-18 06:10 UTC by Yeti
Modified: 2006-05-29 00:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
A suggested patch (1.09 KB, patch)
2004-08-19 15:24 UTC, Yeti
none Details | Review

Description Yeti 2004-08-18 06:10:00 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_.
Comment 1 Yeti 2004-08-19 15:24:43 UTC
Created attachment 30757 [details] [review]
A suggested patch

A trivial patch.
Comment 2 Yeti 2004-08-19 15:30:27 UTC
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?).
Comment 3 Yeti 2006-05-29 00:42:28 UTC
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.