From 6fdf9952e324120ded583e3ab1e469277d68f826 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 4 Aug 1995 14:30:19 +0000 Subject: [PATCH] (_getopt_internal) [lint]: Initialize INDFOUND to avoid warning from gcc. --- lib/getopt.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/getopt.c b/lib/getopt.c index de30ec79fe..3cdb1f2264 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) -- 2.30.2