Bug 185007 - uhsoctl compile fails with -DDEBUG
Summary: uhsoctl compile fails with -DDEBUG
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 10.0-CURRENT
Hardware: Any Any
: Normal Affects Only Me
Assignee: Gavin Atkinson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-19 19:50 UTC by Marcin Cieślak
Modified: 2014-08-13 12:27 UTC (History)
1 user (show)

See Also:


Attachments
file.diff (417 bytes, patch)
2013-12-19 19:50 UTC, Marcin Cieślak
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marcin Cieślak 2013-12-19 19:50:00 UTC
The buildworld process stops with an error:

cc  -O2 -pipe -fno-omit-frame-pointer -march=nocona -DDEBUG -std=gnu99 -Qunused-arguments -fstack-protector -Wsystem-headers -Werror -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Wno-parentheses -c /usr/src/usr.sbin/uhsoctl/uhsoctl.c
ESC[1m/usr/src/usr.sbin/uhsoctl/uhsoctl.c:604:48: ESC[0mESC[0;1;31merror: ESC[0mESC[1mformat specifies type 'int' but the
      argument has type 'size_t' (aka 'unsigned long') [-Werror,-Wformat]ESC[0m
                fprintf(stderr, "SYNC_EXP: %s (%d)\n", resp, l);
                                               ~~            ^
                                               %zu
Comment 1 commit-hook freebsd_committer freebsd_triage 2014-07-05 19:53:33 UTC
A commit references this bug:

Author: gavin
Date: Sat Jul  5 19:53:22 UTC 2014
New revision: 268298
URL: http://svnweb.freebsd.org/changeset/base/268298

Log:
  Correct format string to fix build of uhsoctl when DEBUG is defined

  PR:		185007
  Submitted by:	saper saper.info
  MFC after:	3 days

Changes:
  head/usr.sbin/uhsoctl/uhsoctl.c
Comment 2 commit-hook freebsd_committer freebsd_triage 2014-07-05 20:08:35 UTC
A commit references this bug:

Author: gavin
Date: Sat Jul  5 20:08:26 UTC 2014
New revision: 268299
URL: http://svnweb.freebsd.org/changeset/base/268299

Log:
  Use %zu not %zd for printing size_t.

  PR:		185007
  Submitted by:	saper saper.info
  MFC after:	3 days

Changes:
  head/usr.sbin/uhsoctl/uhsoctl.c
Comment 3 Gavin Atkinson freebsd_committer freebsd_triage 2014-07-05 20:10:18 UTC
Thank you for your patch, I have committed your fix and will merge it in a few days.
Comment 4 commit-hook freebsd_committer freebsd_triage 2014-07-16 12:58:09 UTC
A commit references this bug:

Author: gavin
Date: Wed Jul 16 12:57:50 UTC 2014
New revision: 268761
URL: http://svnweb.freebsd.org/changeset/base/268761

Log:
  Merge r268298,r268299 from head:
    Correct format string to fix build of uhsoctl when DEBUG is defined

  PR:		185007
  Submitted by:	saper saper.info

Changes:
_U  stable/9/usr.sbin/uhsoctl/
  stable/9/usr.sbin/uhsoctl/uhsoctl.c
Comment 5 commit-hook freebsd_committer freebsd_triage 2014-07-16 12:58:10 UTC
A commit references this bug:

Author: gavin
Date: Wed Jul 16 12:57:53 UTC 2014
New revision: 268762
URL: http://svnweb.freebsd.org/changeset/base/268762

Log:
  Merge r268298,r268299 from head:
    Correct format string to fix build of uhsoctl when DEBUG is defined

  PR:		185007
  Submitted by:	saper saper.info

Changes:
_U  stable/10/
  stable/10/usr.sbin/uhsoctl/uhsoctl.c