From saper@saper.info  Thu Dec 19 19:40:12 2013
Return-Path: <saper@saper.info>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id ADB945C5
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 19 Dec 2013 19:40:12 +0000 (UTC)
Received: from l.saper.info (l.saper.info [IPv6:2001:41d0:1:d467::1000])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 444EF120B
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 19 Dec 2013 19:40:11 +0000 (UTC)
Received: from l.saper.info (localhost [127.0.0.1])
	by l.saper.info (8.14.6/8.14.6) with ESMTP id rBJJe8xZ075667
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 19 Dec 2013 19:40:08 GMT
	(envelope-from saper@saper.info)
Received: (from uucp@localhost)
	by l.saper.info (8.14.6/8.14.6/Submit) with UUCP id rBJJe8Px075666
	for FreeBSD-gnats-submit@freebsd.org; Thu, 19 Dec 2013 19:40:08 GMT
	(envelope-from saper@saper.info)
Received: from radziecki.saper.info (saper@localhost [127.0.0.1])
	by radziecki.saper.info (8.14.5/8.14.5) with ESMTP id rBJJdRvI019807
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO)
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 19 Dec 2013 19:39:28 GMT
	(envelope-from saper@saper.info)
Received: (from saper@localhost)
	by radziecki.saper.info (8.14.5/8.14.5/Submit) id rBJJdRma019783;
	Thu, 19 Dec 2013 19:39:27 GMT
	(envelope-from saper)
Message-Id: <201312191939.rBJJdRma019783@radziecki.saper.info>
Date: Thu, 19 Dec 2013 19:39:27 GMT
From: Marcin Cieslak <saper@saper.info>
Reply-To: Marcin Cieslak <saper@saper.info>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: uhsoctl compile fails with -DDEBUG
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         185007
>Category:       bin
>Synopsis:       uhsoctl compile fails with -DDEBUG
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Dec 19 19:50:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Marcin Cieslak
>Release:        FreeBSD 10.0-CURRENT amd64
>Organization:
>Environment:
System: FreeBSD radziecki.saper.info 10.0-CURRENT FreeBSD 10.0-CURRENT #2 r241671M: Thu Oct 18 09:38:06 CEST 2012 saper@radziecki.saper.info:/a/icybox/obj/usr/src/sys/VAIO amd64

Trying to build r259613 on an oldish 10.x machine. I have this applied to the
uhsoctl Makefile:

Index: /usr/src/usr.sbin/uhsoctl/Makefile
===================================================================
--- /usr/src/usr.sbin/uhsoctl/Makefile	(revision 259613)
+++ /usr/src/usr.sbin/uhsoctl/Makefile	(working copy)
@@ -3,6 +3,7 @@
 PROG=	uhsoctl
 MAN=	uhsoctl.1
 WARNS?=	1
+CFLAGS+= -DDEBUG
 
 DPADD=	${LIBUTIL}
 LDADD=	-lutil

>Description:

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

>How-To-Repeat:

>Fix:

Index: /usr/src/usr.sbin/uhsoctl/uhsoctl.c
===================================================================
--- /usr/src/usr.sbin/uhsoctl/uhsoctl.c	(revision 259613)
+++ /usr/src/usr.sbin/uhsoctl/uhsoctl.c	(working copy)
@@ -601,7 +601,7 @@
 	if (resp != NULL) {
 		l = strlen(resp);
 #ifdef DEBUG
-		fprintf(stderr, "SYNC_EXP: %s (%d)\n", resp, l);
+		fprintf(stderr, "SYNC_EXP: %s (%zu)\n", resp, l);
 #endif
 	}
 
>Release-Note:
>Audit-Trail:
>Unformatted:
