Date: Thu, 28 Jun 2001 23:58:28 -0400 (EDT) From: Mike Barcroft <mike@q9media.com> To: audit@FreeBSD.org Subject: src/bin/chio patch Message-ID: <200106290358.f5T3wSt97957@coffee.q9media.com>
next in thread | raw e-mail | index | archive | help
I would appreciate it if someone would review and commit the patch at the end of this message. Also available at: http://testbed.q9media.net/freebsd/chio.20010628.patch Best regards, Mike Barcroft ----------------------------------------------------------------------- chio.20010628.patch o Constify o Set WARNS?=2 Index: chio/Makefile =================================================================== RCS file: /home/ncvs/src/bin/chio/Makefile,v retrieving revision 1.7 diff -u -r1.7 Makefile --- chio/Makefile 2001/05/18 13:41:20 1.7 +++ chio/Makefile 2001/06/29 02:46:46 @@ -2,6 +2,7 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 PROG= chio +WARNS?= 2 SRCS= chio.c .include <bsd.prog.mk> Index: chio/chio.c =================================================================== RCS file: /home/ncvs/src/bin/chio/chio.c,v retrieving revision 1.17 diff -u -r1.17 chio.c --- chio/chio.c 2000/09/18 06:09:11 1.17 +++ chio/chio.c 2001/06/29 02:46:46 @@ -68,16 +68,16 @@ static void find_element __P((char *, u_int16_t *, u_int16_t *)); static struct changer_element_status *get_element_status __P((u_int16_t, u_int16_t)); -static int do_move __P((char *, int, char **)); -static int do_exchange __P((char *, int, char **)); -static int do_position __P((char *, int, char **)); -static int do_params __P((char *, int, char **)); -static int do_getpicker __P((char *, int, char **)); -static int do_setpicker __P((char *, int, char **)); -static int do_status __P((char *, int, char **)); -static int do_ielem __P((char *, int, char **)); -static int do_return __P((char *, int, char **)); -static int do_voltag __P((char *, int, char **)); +static int do_move __P((const char *, int, char **)); +static int do_exchange __P((const char *, int, char **)); +static int do_position __P((const char *, int, char **)); +static int do_params __P((const char *, int, char **)); +static int do_getpicker __P((const char *, int, char **)); +static int do_setpicker __P((const char *, int, char **)); +static int do_status __P((const char *, int, char **)); +static int do_ielem __P((const char *, int, char **)); +static int do_return __P((const char *, int, char **)); +static int do_voltag __P((const char *, int, char **)); #ifndef CHET_VT #define CHET_VT 10 /* Completely Arbitrary */ @@ -176,7 +176,7 @@ static int do_move(cname, argc, argv) - char *cname; + const char *cname; int argc; char **argv; { @@ -257,7 +257,7 @@ static int do_exchange(cname, argc, argv) - char *cname; + const char *cname; int argc; char **argv; { @@ -369,7 +369,7 @@ static int do_position(cname, argc, argv) - char *cname; + const char *cname; int argc; char **argv; { @@ -433,7 +433,7 @@ /* ARGSUSED */ static int do_params(cname, argc, argv) - char *cname; + const char *cname; int argc; char **argv; { @@ -479,7 +479,7 @@ /* ARGSUSED */ static int do_getpicker(cname, argc, argv) - char *cname; + const char *cname; int argc; char **argv; { @@ -509,7 +509,7 @@ static int do_setpicker(cname, argc, argv) - char *cname; + const char *cname; int argc; char **argv; { @@ -540,14 +540,14 @@ static int do_status(cname, argc, argv) - char *cname; + const char *cname; int argc; char **argv; { struct changer_params cp; struct changer_element_status_request cesr; int i, count, base, chet, schet, echet; - char *description; + const char *description; int pvoltag = 0; int avoltag = 0; int sense = 0; @@ -762,7 +762,7 @@ static int do_ielem(cname, argc, argv) - char *cname; + const char *cname; int argc; char **argv; { @@ -788,7 +788,7 @@ static int do_voltag(cname, argc, argv) - char *cname; + const char *cname; int argc; char **argv; { @@ -977,7 +977,7 @@ */ static int do_return(cname, argc, argv) - char *cname; + const char *cname; int argc; char **argv; { Index: chio/defs.h =================================================================== RCS file: /home/ncvs/src/bin/chio/defs.h,v retrieving revision 1.2 diff -u -r1.2 defs.h --- chio/defs.h 1999/08/27 23:13:35 1.2 +++ chio/defs.h 2001/06/29 02:46:46 @@ -33,18 +33,18 @@ */ struct element_type { - char *et_name; /* name; i.e. "picker, "slot", etc. */ + const char *et_name; /* name; i.e. "picker, "slot", etc. */ int et_type; /* type number */ }; struct changer_command { - char *cc_name; /* command name */ + const char *cc_name; /* command name */ /* command handler */ - int (*cc_handler) __P((char *, int, char **)); + int (*cc_handler) __P((const char *, int, char **)); }; struct special_word { - char *sw_name; /* special word */ + const char *sw_name; /* special word */ int sw_value; /* token value */ }; 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?200106290358.f5T3wSt97957>