From owner-freebsd-audit Fri Aug 3 19:45:21 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 3DF3A37B403 for ; Fri, 3 Aug 2001 19:45:17 -0700 (PDT) (envelope-from mike@coffee.q9media.com) Received: (from mike@localhost) by coffee.q9media.com (8.11.2/8.11.2) id f7434ll04571 for audit@FreeBSD.org; Fri, 3 Aug 2001 23:04:47 -0400 (EDT) (envelope-from mike) Date: Fri, 3 Aug 2001 23:04:47 -0400 From: Mike Barcroft To: audit@FreeBSD.org Subject: lam(1) warns patch Message-ID: <20010803230447.A4563@coffee.q9media.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i 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 I'd appreciate comments on the following patch. If there are no objections, I'd like to commit this shortly. Best regards, Mike Barcroft ---------------------------------------------------------------------- lam.20010803.patch o Constify, staticize, set WARNS?=2. Index: lam/Makefile =================================================================== RCS file: /home/ncvs/src/usr.bin/lam/Makefile,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 Makefile --- lam/Makefile 1994/05/27 12:31:55 1.1.1.1 +++ lam/Makefile 2001/08/04 02:14:26 @@ -1,5 +1,7 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 +# $FreeBSD$ PROG= lam +WARNS?= 2 .include Index: lam/lam.c =================================================================== RCS file: /home/ncvs/src/usr.bin/lam/lam.c,v retrieving revision 1.7 diff -u -r1.7 lam.c --- lam/lam.c 2001/02/08 20:15:59 1.7 +++ lam/lam.c 2001/08/04 02:14:26 @@ -64,8 +64,8 @@ short eof; /* eof flag */ short pad; /* pad flag for missing columns */ char eol; /* end of line character */ - char *sepstring; /* string to print before each line */ - char *format; /* printf(3) style string spec. */ + const char *sepstring; /* string to print before each line */ + const char *format; /* printf(3) style string spec. */ } input[MAXOFILES]; int morefiles; /* set by getargs(), changed by gatherline() */ @@ -73,13 +73,13 @@ char line[BIGBUFSIZ]; char *linep; -char *gatherline(struct openfile *); -void getargs(char *[]); -char *pad(struct openfile *); +static char *gatherline(struct openfile *); +static void getargs(char *[]); +static char *pad(struct openfile *); static void usage(void); int -main(int argc, char *argv[]) +main(int argc __unused, char *argv[]) { struct openfile *ip; @@ -99,7 +99,7 @@ } } -void +static void getargs(char *av[]) { struct openfile *ip = input; @@ -176,7 +176,7 @@ ip->sepstring = ""; } -char * +static char * pad(struct openfile *ip) { char *lp = linep; @@ -190,7 +190,7 @@ return (lp); } -char * +static char * gatherline(struct openfile *ip) { char s[BUFSIZ]; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message