xwininfo: const in iconv

Alan Coopersmith alan.coopersmith at oracle.com
Sat Aug 25 10:51:10 PDT 2012


On 08/25/12 02:24 AM, Thomas Klausner wrote:
> With master, I don't see any warning about the iconv line.
> Many other warnings though :)

Yeah, generating configure scripts using the latest Xorg macros with all the
additional -W flags will do that.

> xwininfo.c: In function ‘scale_init’:
> xwininfo.c:327:27: warning: declaration of ‘screen’ shadows a global declaration
> xwininfo.c:258:22: warning: shadowed declaration is here
> 
> These are the lines:
> xwininfo.c:static xcb_screen_t *screen;
> xwininfo.c:scale_init (xcb_screen_t *screen)
> 
> Patch attached.

Looks good to me.

> xwininfo.c: In function ‘wm_size_hints_reply’:
> xwininfo.c:707:40: warning: declaration of ‘dpy’ shadows a global declaration
> xwininfo.c:257:26: warning: shadowed declaration is here
> xwininfo.c:708:61: warning: declaration of ‘err’ shadows a global declaration
> xwininfo.c:259:29: warning: shadowed declaration is here
> xwininfo.c: In function ‘Display_Window_Id’:
> xwininfo.c:845:3: warning: cast discards qualifiers from pointer target type
> xwininfo.c: In function ‘wm_hints_reply’:
> xwininfo.c:1611:35: warning: declaration of ‘dpy’ shadows a global declaration
> xwininfo.c:257:26: warning: shadowed declaration is here
> xwininfo.c:1612:51: warning: declaration of ‘err’ shadows a global declaration
> xwininfo.c:259:29: warning: shadowed declaration is here
> xwininfo.c: In function ‘get_net_wm_name’:
> xwininfo.c:1781:36: warning: declaration of ‘dpy’ shadows a global declaration
> xwininfo.c:257:26: warning: shadowed declaration is here
> xwininfo.c: In function ‘get_friendly_name’:
> xwininfo.c:1970:6: warning: array subscript has type ‘char’
> xwininfo.c: In function ‘usage’:
> xwininfo.c:282:1: warning: function might be possible candidate for attribute ‘noreturn’
> xwininfo.c: In function ‘print_utf8.clone.5’:
> xwininfo.c:1830:19: warning: ‘codepoint’ may be used uninitialized in this function
> xwininfo.c:1830:19: note: ‘codepoint’ was declared here
> 
> Should I try fixing the others as well?

If you'd like to, please go ahead.   We've got a lot of noise in our builds
still that we'd like to clean up to help root out the bugs hiding in them.


-- 
	-Alan Coopersmith-              alan.coopersmith at oracle.com
	 Oracle Solaris Engineering - http://blogs.oracle.com/alanc


More information about the xorg-devel mailing list