From owner-freebsd-hackers Fri Sep 17 1:21:57 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from ns.itga.com.au (ns.itga.com.au [192.83.119.129]) by hub.freebsd.org (Postfix) with ESMTP id 73F8C14D2A for ; Fri, 17 Sep 1999 01:21:38 -0700 (PDT) (envelope-from gnb@itga.com.au) Received: from lightning.itga.com.au (lightning.itga.com.au [192.168.71.20]) by ns.itga.com.au (8.9.3/8.9.3) with ESMTP id SAA07482 for ; Fri, 17 Sep 1999 18:21:35 +1000 (EST) Received: from lightning (lightning [192.168.71.20]) by lightning.itga.com.au (8.9.1a/8.9.1) with ESMTP id SAA15276; Fri, 17 Sep 1999 18:21:35 +1000 (EST) Message-Id: <199909170821.SAA15276@lightning.itga.com.au> X-Mailer: exmh version 2.0.1 12/23/97 From: Gregory Bond To: hackers@freebsd.org Subject: "style" question Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 17 Sep 1999 18:21:35 +1000 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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