From owner-svn-src-all@FreeBSD.ORG Tue May 31 14:48:05 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66441106564A; Tue, 31 May 2011 14:48:05 +0000 (UTC) (envelope-from ben@links.org) Received: from mail.links.org (mail.links.org [217.155.92.109]) by mx1.freebsd.org (Postfix) with ESMTP id 1F1E78FC13; Tue, 31 May 2011 14:48:04 +0000 (UTC) Received: from [193.133.15.218] (localhost [127.0.0.1]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.links.org (Postfix) with ESMTPS id F005233C1A; Tue, 31 May 2011 15:28:45 +0100 (BST) Message-ID: <4DE4FB1D.8090407@links.org> Date: Tue, 31 May 2011 15:28:45 +0100 From: Ben Laurie User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <201105182106.p4IL6KkE008657@svn.freebsd.org> <20110518211651.GE2273@garage.freebsd.pl> In-Reply-To: <20110518211651.GE2273@garage.freebsd.pl> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r222084 - head/contrib/gperf/src X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 May 2011 14:48:05 -0000 On 18/05/2011 22:16, Pawel Jakub Dawidek wrote: > On Wed, May 18, 2011 at 09:06:20PM +0000, Ben Laurie wrote: >> Author: benl >> Date: Wed May 18 21:06:20 2011 >> New Revision: 222084 >> URL: http://svn.freebsd.org/changeset/base/222084 >> >> Log: >> Fix clang warnings. >> >> Approved by: philip (mentor) > [...] >> - fprintf (stderr, " by changing asso_value['%c'] (char #%d) to %d\n", >> + fprintf (stderr, " by changing asso_value['%c'] (char #%zd) to %d\n", >> *p, p - union_set + 1, asso_values[(unsigned char)(*p)]); > > Hmm, both 'p' and 'union_set' are 'char *' and %zd is for ssize_t. It is > a bit strange that it fixes the warning. Why? The difference between two pointers is ssize_t, surely? -- http://www.apache-ssl.org/ben.html http://www.links.org/ "There is no limit to what a man can do or how far he can go if he doesn't mind who gets the credit." - Robert Woodruff