[PATCH libXi 2/3] Silence compiler warning in XListDProp.c
peter.hutterer at who-t.net
Thu May 5 18:07:47 PDT 2011
On Fri, May 06, 2011 at 01:57:32AM +0100, Daniel Stone wrote:
> On Fri, May 06, 2011 at 10:46:02AM +1000, Peter Hutterer wrote:
> > XListDProp.c: In function 'XListDeviceProperties':
> > XListDProp.c:72:9: warning: pointer targets in passing argument 2 of
> > '_XRead32' differ in signedness
> > /usr/include/X11/Xlibint.h:652:13: note: expected 'long int *' but argument
> > is of type 'Atom *'
> God I hate Xlib. This does seem correct though.
> Reviewed-by: Daniel Stone <daniel at fooishbar.org>
should've probably been more expansive on the commit message but:
Atoms are typedef'd as unsigned long, see Xdefs.h. Hence the hilarity
with 32 bit property handling on 64 bit.
_XRead32 is a macro on 32bit (casting to (char*), hence no warning) but a
function that takes a long* on 64 bit (hence the warning).
More information about the xorg-devel