Bug 74643 - Incorrect format specification
Summary: Incorrect format specification
Status: RESOLVED MOVED
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/pciaccess (show other bugs)
Version: git
Hardware: Other Linux (All)
: medium trivial
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-07 01:56 UTC by ctuffli
Modified: 2018-08-10 20:18 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

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.