From owner-freebsd-current@FreeBSD.ORG Thu Jan 12 22:46:22 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 622C8106566B for ; Thu, 12 Jan 2012 22:46:22 +0000 (UTC) (envelope-from ken@kdm.org) Received: from nargothrond.kdm.org (nargothrond.kdm.org [70.56.43.81]) by mx1.freebsd.org (Postfix) with ESMTP id 22C138FC16 for ; Thu, 12 Jan 2012 22:46:22 +0000 (UTC) Received: from nargothrond.kdm.org (localhost [127.0.0.1]) by nargothrond.kdm.org (8.14.2/8.14.2) with ESMTP id q0CMDkxh012274; Thu, 12 Jan 2012 15:13:46 -0700 (MST) (envelope-from ken@nargothrond.kdm.org) Received: (from ken@localhost) by nargothrond.kdm.org (8.14.2/8.14.2/Submit) id q0CMDjJm012273; Thu, 12 Jan 2012 15:13:45 -0700 (MST) (envelope-from ken) Date: Thu, 12 Jan 2012 15:13:45 -0700 From: "Kenneth D. Merry" To: Dan McGregor Message-ID: <20120112221345.GA10593@nargothrond.kdm.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2i Cc: freebsd-current@freebsd.org Subject: Re: ctlstat not building with clang X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2012 22:46:22 -0000 On Thu, Jan 12, 2012 at 14:59:11 -0600, Dan McGregor wrote: > Building world with clang now (as of r229997) no longer compiles because > ctlstat was imported into the tree. The error is: > > clang -O2 -pipe -I/usr/src/usr.bin/ctlstat/../../sys -std=gnu99 > -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W > -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes > -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow > -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs > -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -c > /usr/src/usr.bin/ctlstat/ctlstat.c > /usr/src/usr.bin/ctlstat/ctlstat.c:149:35: error: format string is not a > string literal (potentially insecure) > [-Werror,-Wformat-security] > fprintf(error ? stderr : stdout, ctlstat_usage); > ^~~~~~~~~~~~~ > 1 error generated. > *** Error code 1 > > Stop in /usr/src/usr.bin/ctlstat > > How do people feel about the attached patch that turns a call to fprintf to > fputs? Looks fine, I just committed it. Thanks, Ken -- Kenneth Merry ken@FreeBSD.ORG