GNOME Bugzilla – Bug 624561
/usr/include/glib-2.0/glib/gthread.h:348: warning: cast discards qualifiers from pointer target type
Last modified: 2010-07-16 20:38:22 UTC
Hi, thanks for your work! as seen on libglib2.0-dev (2.24.0-0ubuntu1) on Ubuntu and on libglib2.0-dev (2.24.1-1) on Debian/unstable, just including <glib.h> when using -Wcast-qual will result in a warning. (see Ubuntu's bug: https://bugs.launchpad.net/ubuntu/+source/glib2.0/+bug/554278 for more verbose information). I'm not 100% sure if this is a duplicate of either 608137 or 600315, sorry if it is. Cheers and thanks again for your work, Stefan.
It's a dup. And the solution is more-or-less "don't do that then"; -Wcast-qual generates false positives that can't always be worked around. (I'm not sure if it can be worked around in this particular case; AFAIK no one has tried.) *** This bug has been marked as a duplicate of bug 608137 ***
Sorry for the dupe (should I post there?) I can understand the solution, but it's certainly sad for projects using glib, since that means they cannot use -Wcast-qual at all to find warnings *in the project* (which might [and have proven to show for my case] be programming errors.). Nonetheless thanks for your work and the quick response, Stefan.