From owner-svn-src-head@FreeBSD.ORG Fri Jun 5 13:25:35 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FA071065673; Fri, 5 Jun 2009 13:25:35 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) by mx1.freebsd.org (Postfix) with ESMTP id 18AA68FC14; Fri, 5 Jun 2009 13:25:35 +0000 (UTC) (envelope-from jilles@stack.nl) Received: by mx1.stack.nl (Postfix, from userid 65534) id 2A4ED359960; Fri, 5 Jun 2009 15:25:34 +0200 (CEST) X-Spam-DCC: dcc.uncw.edu: scanner01.stack.nl 1201; Body=1 Fuz1=1 Fuz2=1 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on scanner01.stack.nl X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,NO_RELAYS autolearn=ham version=3.2.5 X-Spam-Relay-Country: _RELAYCOUNTRY_ Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 431DC359956; Fri, 5 Jun 2009 15:25:32 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id 97A2A228CB; Fri, 5 Jun 2009 15:25:19 +0200 (CEST) Date: Fri, 5 Jun 2009 15:25:19 +0200 From: Jilles Tjoelker To: Bruce Evans Message-ID: <20090605132519.GA4091@stack.nl> References: <200906042343.n54Nh8c5008164@svn.freebsd.org> <20090605102431.4769115f.stas@FreeBSD.org> <20090605182104.S15688@delplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090605182104.S15688@delplex.bde.org> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: Stanislav Sedov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Benno Rice Subject: Re: svn commit: r193475 - head/sbin/kldload X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jun 2009 13:25:36 -0000 On Fri, Jun 05, 2009 at 06:52:07PM +1000, Bruce Evans wrote: > Well, %z might be wrong since only the pathlen variable is of type size_t. > The expression `pathlen + 1' has type: > __binarypromoteof(__typeof(pathlen), int)), > so if size_t is smaller than int then the promotions are non-null and give > a type larger than size_t, and %z is wrong. To use %z, the expression > should be written as (size_t)(pathlen + 1). The promotion is not a problem because it would happen anyway, as it is an unprototyped parameter. printf and the like know this. -- Jilles Tjoelker