fix WARNS=2

This commit is contained in:
lukem 2001-11-03 12:49:31 +00:00
parent 7a6b533ba6
commit 33b90eebfd
1 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: getoldopt.c,v 1.11 2001/10/25 05:33:33 lukem Exp $ */ /* $NetBSD: getoldopt.c,v 1.12 2001/11/03 12:49:31 lukem Exp $ */
/* /*
* Plug-compatible replacement for getopt() for parsing tar-like * Plug-compatible replacement for getopt() for parsing tar-like
@ -11,7 +11,7 @@
#include <sys/cdefs.h> #include <sys/cdefs.h>
#ifndef lint #ifndef lint
__RCSID("$NetBSD: getoldopt.c,v 1.11 2001/10/25 05:33:33 lukem Exp $"); __RCSID("$NetBSD: getoldopt.c,v 1.12 2001/11/03 12:49:31 lukem Exp $");
#endif /* not lint */ #endif /* not lint */
#include <stdio.h> #include <stdio.h>
@ -24,7 +24,7 @@ __RCSID("$NetBSD: getoldopt.c,v 1.11 2001/10/25 05:33:33 lukem Exp $");
int int
getoldopt(int argc, char **argv, const char *optstring, getoldopt(int argc, char **argv, const char *optstring,
struct option *longopts, int *index) struct option *longopts, int *idx)
{ {
static char *key; /* Points to next keyletter */ static char *key; /* Points to next keyletter */
static char use_getopt; /* !=0 if argv[1][0] was '-' */ static char use_getopt; /* !=0 if argv[1][0] was '-' */
@ -44,7 +44,7 @@ getoldopt(int argc, char **argv, const char *optstring,
if (use_getopt) if (use_getopt)
return ((longopts != NULL) ? return ((longopts != NULL) ?
getopt_long(argc, argv, optstring, longopts, index) : getopt_long(argc, argv, optstring, longopts, idx) :
getopt(argc, argv, optstring)); getopt(argc, argv, optstring));
c = *key++; c = *key++;