Neil Blakey-Milner <[EMAIL PROTECTED]> writes:
> On Fri 1999-09-17 (18:21), Gregory Bond wrote:
> > I'm looking at cleaning up a few compile nits and I'm wondering what the
> > officially approved way of silencing "may not be used" warnings:
> >
> > int
> > foo(int flag)
> > {
> > int j;
> j = 0;
> > if (flag)
> > j = 1;
> >
> return j;
> > }
Hmf, I just realized:
int
foo(int flag)
{
return !!flag;
}
or
#define foo(x) (!!(x))
DES
--
Dag-Erling Smorgrav - [EMAIL PROTECTED]
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message