[PATCH libX11 3/5] fix: warning: pointer targets in passing argument 2 of '_XSend' differ in signedness [-Wpointer-sign]

Peter Hutterer peter.hutterer at who-t.net
Fri Apr 29 02:28:47 UTC 2016


On Thu, Apr 28, 2016 at 06:03:05PM -0700, Alan Coopersmith wrote:
> On 04/28/16 04:43 PM, Peter Hutterer wrote:
> > fixing this isn't going to do much, and adding fake statements neither.
> > to fix the compiler warnings you could do something like:
> > 
> > #define _xlib_used_internally __attribute__((unused))
> > 
> > and then use that to annotate the variable. No need for fake code changes
> > and it's more expressive.
> 
> Yes, if we're going to fix this, please just use attributes instead of adding
> confusing unused code that some other compiler will warn is being optimized out.
> 
> Though I'd prefer _X_UNUSED from <X11/Xfuncproto.h> over the raw attribute
> to take advantage of the existing compiler checks there to see where it's
> safe to use.

oh right, I forgot we already have a define for that, let's use that

Cheers,
   Peter


More information about the xorg-devel mailing list