From owner-freebsd-bugs Tue Sep 3 22:20:12 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 386E537B400 for ; Tue, 3 Sep 2002 22:20:08 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id EB4D543E77 for ; Tue, 3 Sep 2002 22:20:07 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g845K7JU070563 for ; Tue, 3 Sep 2002 22:20:07 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g845K7rG070562; Tue, 3 Sep 2002 22:20:07 -0700 (PDT) Date: Tue, 3 Sep 2002 22:20:07 -0700 (PDT) Message-Id: <200209040520.g845K7rG070562@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Bruce Evans Subject: Re: bin/42386: cleaning code from warnings in libkvm Reply-To: Bruce Evans Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR bin/42386; it has been noted by GNATS. From: Bruce Evans To: Dan Lukes Cc: FreeBSD-gnats-submit@FreeBSD.ORG Subject: Re: bin/42386: cleaning code from warnings in libkvm Date: Wed, 4 Sep 2002 15:18:26 +1000 (EST) On Tue, 3 Sep 2002, Dan Lukes wrote: > >Description: > ... > lib/libkvm/kvm_getswapinfo.c: > 267: warning: unsigned int format, different type arg (arg 5) > int format, different type arg (arg 6) > #>> blk & radix are daddr_t = int64_t = __int64_t = long long 'long long' should never be used. intmax_t should normally be used instead. daddr_t is plain long on alphas, so printing it using %lld format fixes the bug but not the warning. Similar problems for printing virtual addresses are avoided by using a basic type (usually u_long) instead of the correct typedefed type (vm_offset_t). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message