From owner-freebsd-audit Mon Jun 25 21:22: 3 2001 Delivered-To: freebsd-audit@freebsd.org Received: from coffee.q9media.com (coffee.q9media.com [216.94.229.19]) by hub.freebsd.org (Postfix) with ESMTP id 28D6B37B407 for ; Mon, 25 Jun 2001 21:21:59 -0700 (PDT) (envelope-from mike@coffee.q9media.com) Received: (from mike@localhost) by coffee.q9media.com (8.11.2/8.11.2) id f5Q4YtR93160; Tue, 26 Jun 2001 00:34:55 -0400 (EDT) (envelope-from mike) Date: Tue, 26 Jun 2001 00:34:55 -0400 (EDT) Message-Id: <200106260434.f5Q4YtR93160@coffee.q9media.com> To: Dima Dorfman From: Mike Barcroft Cc: audit@FreeBSD.ORG Subject: Re: src/usr.sbin/fdcontrol patch Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Dima Dorfman writes: > Mike Barcroft writes: >> fdcontrol.20010625.patch >> >> o Make two functions static to silence compiler warnings > > I think the right thing to do here would be to add prototypes. Agreed. Updated patch available at the end of this email and also at: http://testbed.q9media.net/freebsd/fdcontrol.20010626.patch Best regards, Mike Barcroft ----------------------------------------------------------------------- fdcontrol.20010626.patch o Make two functions static to silence compiler warnings o Prototype functions and sort includes o Clean up the Makefile a little and set WARNS?=2 Index: fdcontrol/Makefile =================================================================== RCS file: /home/ncvs/src/usr.sbin/fdcontrol/Makefile,v retrieving revision 1.3 diff -u -r1.3 Makefile --- fdcontrol/Makefile 2001/03/26 14:40:02 1.3 +++ fdcontrol/Makefile 2001/06/26 04:12:27 @@ -1,6 +1,7 @@ # $FreeBSD: src/usr.sbin/fdcontrol/Makefile,v 1.3 2001/03/26 14:40:02 ru Exp $ -PROG = fdcontrol -MAN = fdcontrol.8 +PROG= fdcontrol +WARNS?= 2 +MAN= fdcontrol.8 .include Index: fdcontrol/fdcontrol.c =================================================================== RCS file: /home/ncvs/src/usr.sbin/fdcontrol/fdcontrol.c,v retrieving revision 1.7 diff -u -r1.7 fdcontrol.c --- fdcontrol/fdcontrol.c 2001/06/06 06:16:12 1.7 +++ fdcontrol/fdcontrol.c 2001/06/26 04:12:28 @@ -30,14 +30,18 @@ "$FreeBSD: src/usr.sbin/fdcontrol/fdcontrol.c,v 1.7 2001/06/06 06:16:12 joerg Exp $"; #endif /* not lint */ +#include +#include + #include #include #include #include -#include -#include + +static int getnumber(void); +static void usage(void); -int +static int getnumber(void) { int i; @@ -50,7 +54,7 @@ return i; } -void +static void usage(void) { fprintf(stderr, "usage: fdcontrol [-d 0|1] | [-s] device-node\n"); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message