From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 25 13:09:04 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4B94BA2E; Fri, 25 Oct 2013 13:09:04 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from mo6-p00-ob.rzone.de (mo6-p00-ob.rzone.de [IPv6:2a01:238:20a:202:5300::1]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id ADD572561; Fri, 25 Oct 2013 13:09:03 +0000 (UTC) X-RZG-AUTH: :JiIXek6mfvEEUpFQdo7Fj1/zg48CFjWjQv0cW+St/nW/avgusCdtw9+43oQGYIsZZxQQ0xcmsA== X-RZG-CLASS-ID: mo00 Received: from britannica.bec.de (cl-3506.cgn-01.de.sixxs.net [IPv6:2001:4dd0:ff00:db1::2]) by smtp.strato.de (RZmta 32.11 AUTH) with (TLSv1.0:DHE-RSA-AES256-SHA encrypted) ESMTPSA id u01a21p9PC7srU ; Fri, 25 Oct 2013 15:08:47 +0200 (CEST) Received: by britannica.bec.de (sSMTP sendmail emulation); Fri, 25 Oct 2013 15:08:46 +0200 Date: Fri, 25 Oct 2013 15:08:46 +0200 From: Joerg Sonnenberger To: freebsd-hackers@freebsd.org, hackers@freebsd.org Subject: Re: warning spew from cddl libnvpair.c Message-ID: <20131025130846.GA2388@britannica.bec.de> Mail-Followup-To: freebsd-hackers@freebsd.org, hackers@freebsd.org References: <1382672957.18382.11.camel@localhost> <20131025113946.GA15905@britannica.bec.de> <20131025122643.GC12556@insomnia.benzedrine.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20131025122643.GC12556@insomnia.benzedrine.cx> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Oct 2013 13:09:04 -0000 On Fri, Oct 25, 2013 at 02:26:43PM +0200, Daniel Hartmeier wrote: > How is that valid? Different question. > If nvprt_btwnarrfmt contains %, how would > > (void) fprintf(fp, pctl->nvprt_btwnarrfmt); \ > > not crash? Correct. The version I see in NetBSD uses real format strings and arguments of fixed types, so it still has this kind of problems, but it is more clear that it is likely correct. Joerg