xwininfo: const in iconv
Thomas Klausner
wiz at NetBSD.org
Sat Aug 25 15:11:42 PDT 2012
On Sat, Aug 25, 2012 at 10:51:10AM -0700, Alan Coopersmith wrote:
> > 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.
I've just sent a patch to the mailing list which fixes all but two of them.
xwininfo.c: In function ‘usage’:
xwininfo.c:282:1: warning: function might be possible candidate for attribute ‘noreturn’
I'm not sure how to portably specify this attribute.
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
I haven't tracked down why gcc-4.5.2 believes this.
Thomas
More information about the xorg-devel
mailing list