Bug 74643

Summary: Incorrect format specification
Product: xorg Reporter: ctuffli
Component: Lib/pciaccessAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED MOVED QA Contact: Xorg Project Team <xorg-team>
Severity: trivial    
Priority: medium    
Version: git   
Hardware: Other   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description ctuffli 2014-02-07 01:56:18 UTC
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__ */
Comment 1 GitLab Migration User 2018-08-10 20:18:40 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/lib/libpciaccess/issues/4.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.