Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 03 Feb 2002 17:24:53 +0000
From:      Mark Murray <mark@grondar.za>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        Mark Murray <markm@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/sys socket.h types.h 
Message-ID:  <200202031724.g13HOwE61969@greenpeace.grondar.org>
In-Reply-To: <20020204035957.Q20055-100000@gamplex.bde.org> ; from Bruce Evans <bde@zeta.org.au>  "Mon, 04 Feb 2002 04:12:48 %2B1100."
References:  <20020204035957.Q20055-100000@gamplex.bde.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
> On Sun, 3 Feb 2002, Mark Murray wrote:
> 
> > Ok, So what needs to be done?
> 
> Back out the change to howmany().  The caller can always pass it types
> with the same signedness (after promotion) or cast the value.  This
> is a bit like the caller having to do this for min(9undoc):
> min(1U, -1) gives a very wrong value.  min(1U, 1) gives the correct
> value but may only escape being warned about because the args get
> silently converted to u_int.

So how does one write a (decent) macro to return a correct value
for min(1u, -1)?

howmany() is used so much in the kernel, and is defined in multiple
places, so methinks it needs to be a function (inline?). It kicks
out zillions of wanings when you try to lint it.

M
-- 
o       Mark Murray
\_      FreeBSD Services Limited
O.\_    Warning: this .sig is umop ap!sdn

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200202031724.g13HOwE61969>