From owner-freebsd-hackers Fri Sep 17 5:13:26 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from rucus.ru.ac.za (rucus.ru.ac.za [146.231.29.2]) by hub.freebsd.org (Postfix) with SMTP id 8CB8B1588D for ; Fri, 17 Sep 1999 05:13:18 -0700 (PDT) (envelope-from nbm@rucus.ru.ac.za) Received: (qmail 86248 invoked by uid 1003); 17 Sep 1999 12:15:10 -0000 Date: Fri, 17 Sep 1999 14:15:10 +0200 From: Neil Blakey-Milner To: Gregory Bond Cc: hackers@FreeBSD.ORG Subject: Re: "style" question Message-ID: <19990917141510.A85883@rucus.ru.ac.za> References: <199909170821.SAA15276@lightning.itga.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i In-Reply-To: <199909170821.SAA15276@lightning.itga.com.au> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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; > } Or, if you really want to, use your other return scheme. In other words, initialize j, probably to 0. Neil -- Neil Blakey-Milner nbm@rucus.ru.ac.za To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message