Bug 215863

Summary: arch-handbook chapter 11, sample code mypci.c has wrong format string
Product: Documentation Reporter: Martin Waschbüsch <martin>
Component: Books & ArticlesAssignee: freebsd-doc (Nobody) <doc>
Status: Closed FIXED    
Severity: Affects Only Me CC: trhodes
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

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