X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fgetopt.c;h=1af2a9629012667696f507ebc4cc4706862725d5;hb=c89f48f01f6047b50c1ed3c981901f620ec98f6a;hp=de30ec79fec56abda44edbe0882096361c076b7a;hpb=b5da073416f93f9f145ac9eb44794775fbf6a752;p=gnulib.git diff --git a/lib/getopt.c b/lib/getopt.c index de30ec79f..1af2a9629 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; @@ -489,6 +490,10 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) for (nameend = nextchar; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; +#ifdef lint + indfound = 0; /* Avoid spurious compiler warning. */ +#endif + /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++)