Date: Fri, 17 Sep 1999 18:21:35 +1000 From: Gregory Bond <gnb@itga.com.au> To: hackers@freebsd.org Subject: "style" question Message-ID: <199909170821.SAA15276@lightning.itga.com.au>
next in thread | raw e-mail | index | archive | help
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;
if (flag)
j = 1;
/*
* This noop statement is enough to confuse the optimiser so it
* forgets that j is initialised iff flag != 0
*/
flag = !!flag;
if (flag)
return j;
return 0;
}
Us humans can see that j is not used without being set, but cc can't. How do I
remove this warning in a style(9)-compatible way?
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199909170821.SAA15276>
