Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • L libpciaccess
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3
    • Issues 3
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • xorg
  • lib
  • libpciaccess
  • Issues
  • #4

Closed
Open
Created Feb 07, 2014 by Bugzilla Migration User@bugzilla-migration

Incorrect format specification

Submitted by ctu..@..il.com

Assigned to Xorg Project Team

Link to original bug (#74643)

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 Aug 17, 2018 by Alan Coopersmith
Assignee
Assign to
Time tracking