From owner-svn-src-all@FreeBSD.ORG Wed Nov 5 05:48:46 2008 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 AD9D11065670; Wed, 5 Nov 2008 05:48:46 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.delphij.net (delphij-pt.tunnel.tserv2.fmt.ipv6.he.net [IPv6:2001:470:1f03:2c9::2]) by mx1.freebsd.org (Postfix) with ESMTP id 51CCA8FC13; Wed, 5 Nov 2008 05:48:46 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [211.166.10.233]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.delphij.net (Postfix) with ESMTPS id 3BF1A28454; Wed, 5 Nov 2008 13:48:45 +0800 (CST) Received: from localhost (tarsier.geekcn.org [211.166.10.233]) by tarsier.geekcn.org (Postfix) with ESMTP id 3731FEC2121; Wed, 5 Nov 2008 13:48:44 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([211.166.10.233]) by localhost (mail.geekcn.org [211.166.10.233]) (amavisd-new, port 10024) with ESMTP id s1Es2QHdoXkv; Wed, 5 Nov 2008 13:48:39 +0800 (CST) Received: from charlie.delphij.net (adsl-76-237-33-62.dsl.pltn13.sbcglobal.net [76.237.33.62]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id 07647EC1EEF; Wed, 5 Nov 2008 13:48:36 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=kRy+hIcI+T9rZOv9FKCqhdfB+2f2E9XTcyH1MxF7CnC/A5vdgsDezpJP3J2EV5LVb GFWI4s3q0Qes60ruKcfoQ== Message-ID: <491133B1.9050208@delphij.net> Date: Tue, 04 Nov 2008 21:48:33 -0800 From: Xin LI Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.17 (X11/20080928) MIME-Version: 1.0 To: Tim Kientzle References: <200811050526.mA55QBk4017410@svn.freebsd.org> In-Reply-To: <200811050526.mA55QBk4017410@svn.freebsd.org> X-Enigmail-Version: 0.95.7 OpenPGP: id=18EDEBA0; url=http://www.delphij.net/delphij.asc Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG Subject: Re: svn commit: r184668 - head/usr.bin/tar/test X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net 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: Wed, 05 Nov 2008 05:48:46 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Tim Kientzle wrote: > Author: kientzle > Date: Wed Nov 5 05:26:11 2008 > New Revision: 184668 > URL: http://svn.freebsd.org/changeset/base/184668 > > Log: > Fix compile warnings building on amd64. This is modified slightly > from Jaakko's original patch: I have misgivings about the portability > of the 'z' printf modifier so opted to cast the arguments to (int) > instead. > > PR: bin/128561 > Submitted by: Jaakko Heinonen > MFC after: 30 days > [...] > @@ -494,7 +494,8 @@ test_assert_empty_file(const char *f1fmt > if (fd < 0) { > fprintf(stderr, " Unable to open %s\n", f1); > } else { > - s = sizeof(buff) < st.st_size ? sizeof(buff) : st.st_size; > + s = (sizeof(buff) < (size_t)st.st_size) ? > + (ssize_t)sizeof(buff) : (ssize_t)st.st_size; I'm more or less concerned about this - st_size is off_t, is it safe to cast it to size_t when comparing here? > s = read(fd, buff, s); > hexdump(buff, NULL, s, 0); > } > - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkkRM7AACgkQi+vbBBjt66D/YwCgqm9Do0SwckV4Da86gEyU4Yk8 AXMAni2tF+SzEObjliVy1z03irw7Qd6g =M8sh -----END PGP SIGNATURE-----