From baebd086f994bc820b2656fb7288aa693e02d5c9 Mon Sep 17 00:00:00 2001 From: thorpej Date: Sun, 20 Jul 1997 04:44:53 +0000 Subject: [PATCH] - Use __COPYRIGHT() and __RCSID(). - Fix compiler warnings. --- bin/chio/chio.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/bin/chio/chio.c b/bin/chio/chio.c index 2b381c199c55..afdd3a7656d7 100644 --- a/bin/chio/chio.c +++ b/bin/chio/chio.c @@ -1,4 +1,4 @@ -/* $NetBSD: chio.c,v 1.1.1.1 1996/04/03 00:34:38 thorpej Exp $ */ +/* $NetBSD: chio.c,v 1.2 1997/07/20 04:44:53 thorpej Exp $ */ /* * Copyright (c) 1996 Jason R. Thorpe @@ -32,6 +32,12 @@ * SUCH DAMAGE. */ +#include +#ifndef lint +__COPYRIGHT("@(#) Copyright (c) 1996 Jason R. Thorpe. All rights reserved."); +__RCSID("$NetBSD: chio.c,v 1.2 1997/07/20 04:44:53 thorpej Exp $"); +#endif + #include #include #include @@ -49,6 +55,7 @@ extern char *__progname; /* from crt0.o */ +int main __P((int, char *[])); static void usage __P((void)); static void cleanup __P((void)); static int parse_element_type __P((char *)); @@ -100,10 +107,9 @@ static char *changer_name; int main(argc, argv) int argc; - char **argv; + char *argv[]; { int ch, i; - char *cp; while ((ch = getopt(argc, argv, "f:")) != -1) { switch (ch) { @@ -470,7 +476,7 @@ do_status(cname, argc, argv) struct changer_params data; u_int8_t *statusp; int i, count, chet, schet, echet; - char *cmdname, *description; + char *description; /* * On a status command, we expect the following: @@ -523,6 +529,11 @@ do_status(cname, argc, argv) count = data.cp_ndrives; description = "drive"; break; + + default: + /* To appease gcc -Wuninitialized. */ + count = 0; + description = NULL; } if (count == 0) {