Incorrect format specification
Submitted by ctu..@..il.com
Assigned to Xorg Project Team
Description
Building libpciaccess generates a warning on versions of Linux in which the definition of the struct mtrr_sentry has changed to __u64:
...
CC linux_sysfs.lo
linux_sysfs.c: In function 'pci_device_linux_sysfs_map_range':
linux_sysfs.c:594:7: warning: format '%lx' expects argument of type 'long unsign
ed int', but argument 3 has type '__u64' [-Wformat=]
strerror(errno), errno);
^
linux_sysfs.c: In function 'pci_device_linux_sysfs_unmap_range':
linux_sysfs.c:669:7: warning: format '%lx' expects argument of type 'long unsign
ed int', but argument 3 has type '__u64' [-Wformat=]
strerror(errno), errno);
^
Earlier version of Linux defined this structure the same for both i386 and x86_64. More recent version changed the structure to be:
#ifdef __i386__
struct mtrr_sentry {
unsigned long base; /* Base address */
...
#else /* __i386__ */
struct mtrr_sentry {
__u64 base; /* Base address */
...
#endif /* !__i386__ */
Version: git
Edited by Alan Coopersmith