summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1995-08-04 14:30:19 +0000
committerJim Meyering <jim@meyering.net>1995-08-04 14:30:19 +0000
commitf6b3413fcc64bfe4f4a3080d2b1a179bcae00768 (patch)
treea8a3ed3fb68d02bac78024227255175b488774e5 /lib
parente799d19df822fb0c87dbc8f7bd797686d7f7eff5 (diff)
downloadcoreutils-f6b3413fcc64bfe4f4a3080d2b1a179bcae00768.tar.xz
(_getopt_internal) [lint]: Initialize INDFOUND to
avoid warning from gcc.
Diffstat (limited to 'lib')
-rw-r--r--lib/getopt.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/getopt.c b/lib/getopt.c
index de30ec79f..3cdb1f226 100644
--- a/lib/getopt.c
+++ b/lib/getopt.c
@@ -476,7 +476,8 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
if (longopts != NULL
&& (argv[optind][1] == '-'
- || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1])))))
+ || (long_only && (argv[optind][2]
+ || !my_index (optstring, argv[optind][1])))))
{
char *nameend;
const struct option *p;
@@ -509,8 +510,13 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
indfound = option_index;
}
else
- /* Second or later nonexact match found. */
- ambig = 1;
+ {
+ /* Second or later nonexact match found. */
+ ambig = 1;
+#ifdef lint
+ indfound = 0;
+#define
+ }
}
if (ambig && !exact)