Skip to content

Commit

Permalink
When an unknown option is found, ignore it, as it may be cc related (…
Browse files Browse the repository at this point in the history
…i.e.,

-D and -I options).
  • Loading branch information
jmmv authored and jmmv committed Jan 18, 2003
1 parent 6d00714 commit 1f46362
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions usr.bin/mkdep/mkdep.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $NetBSD: mkdep.c,v 1.13 2003/01/18 21:13:58 jmmv Exp $ */
/* $NetBSD: mkdep.c,v 1.14 2003/01/18 22:32:20 jmmv Exp $ */

/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
Expand Down Expand Up @@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1999 The NetBSD Foundation, Inc.\n\
#endif /* not lint */

#if defined(__RCSID) && !defined(lint)
__RCSID("$NetBSD: mkdep.c,v 1.13 2003/01/18 21:13:58 jmmv Exp $");
__RCSID("$NetBSD: mkdep.c,v 1.14 2003/01/18 22:32:20 jmmv Exp $");
#endif /* not lint */

#if HAVE_CONFIG_H
Expand Down Expand Up @@ -115,6 +115,7 @@ main(argc, argv)
pflag = 0;
filename = DEFAULT_FILENAME;

opterr = 0;
while ((ch = getopt(argc, argv, "af:p")) != -1) {
switch (ch) {
case 'a':
Expand All @@ -127,8 +128,9 @@ main(argc, argv)
pflag = 1;
break;
default:
usage();
/* NOTREACHED */
/* We need to ignore unknown options, as they may
* be cc related. */
break;
}
}
argc -= optind;
Expand Down

0 comments on commit 1f46362

Please sign in to comment.