Bug 215863 - arch-handbook chapter 11, sample code mypci.c has wrong format string
Summary: arch-handbook chapter 11, sample code mypci.c has wrong format string
Status: Closed FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Books & Articles (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-doc (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-07 21:24 UTC by Martin Waschbüsch
Modified: 2019-03-11 15:13 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Waschbüsch 2017-01-07 21:24:16 UTC
Lines 82 and 93 of the example code (mypci.c) should use the %zd format string instead of %d.
Otherwise the code fails on 64bit arch.
Comment 1 Tom Rhodes freebsd_committer freebsd_triage 2019-03-11 15:12:56 UTC
I updated the documentation, it should be available on the website within 24 hours.  Thanks!
Comment 2 commit-hook freebsd_committer freebsd_triage 2019-03-11 15:13:09 UTC
A commit references this bug:

Author: trhodes
Date: Mon Mar 11 15:12:25 UTC 2019
New revision: 52856
URL: https://svnweb.freebsd.org/changeset/doc/52856

Log:
  Use %zd as the format string.  The previous, %d, is not ssize_t and breaks
  the mypci.c build.

  PR:		215863

Changes:
  head/en_US.ISO8859-1/books/arch-handbook/pci/chapter.xml