From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 18 17:31:13 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D8A1106566B; Sat, 18 Sep 2010 17:31:13 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 2B7D58FC19; Sat, 18 Sep 2010 17:31:12 +0000 (UTC) Received: by qwg5 with SMTP id 5so2980286qwg.13 for ; Sat, 18 Sep 2010 10:31:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=5DkWPnfo/teCp6QxaDxKazLg/ZQNeSCiESarYWsymPM=; b=C5FX06akGjS2VNzJjyvJdpQpIHq/GtSWW3z//1LafHhyR9nVzZA6btFkPgClY5/Pg3 nPrMIv9B8xWJSpvPPR9WLq4GzrVtB+PIRMf1UK1qcP205ekWpXjSkhWsP2qntaWnWVjd CNQ9aOmzyWaKw0yR3YsmTi+wN7sR4N8b+dRnw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=sUq+BDtpUqjh58s81S5qPnsIaVkpGdID32s38dppqaEbhcsL35kSTnX6tdcCXIdQHX MF/Df4IZvgjs2NEwM1Ysd+ksGpe7XHdDHplapZ2k0v99WVXGNif2TfsudzSHooBQPkb4 MjkDUJOSQXwehnPU7DpPLTHvNgJCQIYcwFh7I= MIME-Version: 1.0 Received: by 10.229.11.18 with SMTP id r18mr4405897qcr.281.1284829283744; Sat, 18 Sep 2010 10:01:23 -0700 (PDT) Received: by 10.229.19.206 with HTTP; Sat, 18 Sep 2010 10:01:23 -0700 (PDT) In-Reply-To: References: <4C93236B.4050906@freebsd.org> <4C935F56.4030903@freebsd.org> <20100918143516.3568f40e@r500.local> Date: Sat, 18 Sep 2010 21:01:23 +0400 Message-ID: From: pluknet To: "Robert N. M. Watson" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, Fabian Keil Subject: Re: zfs + uma X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 17:31:13 -0000 On 18 September 2010 17:52, Robert N. M. Watson wrote= : > > On 18 Sep 2010, at 13:35, Fabian Keil wrote: > >> Doesn't build for me on amd64: >> >> fk@r500 /usr/src/tools/tools/umastat $make >> Warning: Object directory not changed from original /usr/src/tools/tools= /umastat >> cc -O2 -pipe =A0-fno-omit-frame-pointer -std=3Dgnu99 -fstack-protector -= Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wst= rict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wn= o-pointer-sign -c umastat.c >> cc1: warnings being treated as errors >> umastat.c: In function 'uma_print_bucketlist': >> umastat.c:234: warning: format '%llu' expects type 'long long unsigned i= nt', but argument 3 has type 'uint64_t' >> umastat.c:234: warning: format '%llu' expects type 'long long unsigned i= nt', but argument 4 has type 'uint64_t' >> umastat.c: In function 'uma_print_cache': >> umastat.c:245: warning: format '%llu' expects type 'long long unsigned i= nt', but argument 3 has type 'u_int64_t' >> umastat.c:246: warning: format '%llu' expects type 'long long unsigned i= nt', but argument 3 has type 'u_int64_t' >> umastat.c: In function 'main': >> umastat.c:416: warning: format '%llu' expects type 'long long unsigned i= nt', but argument 2 has type 'u_int64_t' >> umastat.c:418: warning: format '%llu' expects type 'long long unsigned i= nt', but argument 2 has type 'u_int64_t' >> umastat.c:420: warning: format '%llu' expects type 'long long unsigned i= nt', but argument 2 has type 'u_int64_t' >> umastat.c:426: warning: dereferencing type-punned pointer will break str= ict-aliasing rules >> umastat.c:429: warning: dereferencing type-punned pointer will break str= ict-aliasing rules >> *** Error code 1 >> >> Stop in /usr/src/tools/tools/umastat. >> >> The attached patch seems to work around the problem, I'm not sure if >> the casts to void* are better than decreasing the WARN level, though ... > > This is a 32-bit/64-bit issue. Probably all pointers printing should be c= onverted to %p, and large integer types to %ju and %jd, perhaps with a cast= first to intmax_t or uintmax_t if required. > FYI, There is a PR 146119 about sort of fixing that issues. --=20 wbr, pluknet