[PATCH libX11 3/5] fix: warning: pointer targets in passing argument 2 of '_XSend' differ in signedness [-Wpointer-sign]
Alan Coopersmith
alan.coopersmith at oracle.com
Fri Apr 29 01:03:05 UTC 2016
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.
--
-Alan Coopersmith- alan.coopersmith at oracle.com
Oracle Solaris Engineering - http://blogs.oracle.com/alanc
More information about the xorg-devel
mailing list