Date: Tue, 26 Jun 2001 00:34:55 -0400 (EDT) From: Mike Barcroft <mike@q9media.com> To: Dima Dorfman <dima@unixfreak.org> Cc: audit@FreeBSD.ORG Subject: Re: src/usr.sbin/fdcontrol patch Message-ID: <200106260434.f5Q4YtR93160@coffee.q9media.com>
next in thread | raw e-mail | index | archive | help
Dima Dorfman <dima@unixfreak.org> writes: > Mike Barcroft <mike@q9media.com> 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 <bsd.prog.mk> 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 <sys/fdcio.h> +#include <sys/file.h> + #include <err.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> -#include <sys/file.h> -#include <sys/fdcio.h> + +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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200106260434.f5Q4YtR93160>