Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Dec 2013 19:39:27 GMT
From:      Marcin Cieslak <saper@saper.info>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/185007: uhsoctl compile fails with -DDEBUG
Message-ID:  <201312191939.rBJJdRma019783@radziecki.saper.info>
Resent-Message-ID: <201312191950.rBJJo0XB082155@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201312191939.rBJJdRma019783>