Date: Sat, 18 Sep 2010 21:01:23 +0400 From: pluknet <pluknet@gmail.com> To: "Robert N. M. Watson" <rwatson@freebsd.org> Cc: freebsd-hackers@freebsd.org, Fabian Keil <freebsd-listen@fabiankeil.de> Subject: Re: zfs + uma Message-ID: <AANLkTikqc3Ya4zsF6zZA248S5CoERHm8a=sE%2B9Af93te@mail.gmail.com> In-Reply-To: <F100D77A-CE16-40DE-B441-02E702B12686@FreeBSD.org> References: <4C93236B.4050906@freebsd.org> <4C935F56.4030903@freebsd.org> <alpine.BSF.2.00.1009181221560.86826@fledge.watson.org> <20100918143516.3568f40e@r500.local> <F100D77A-CE16-40DE-B441-02E702B12686@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 18 September 2010 17:52, Robert N. M. Watson <rwatson@freebsd.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTikqc3Ya4zsF6zZA248S5CoERHm8a=sE%2B9Af93te>