Follow-up Comment #3, bug #60639 (project groff):
[comment #2 comment #2:]
> Well, it is trivial to see that incrementing twice is correct
> given the purpose of the code: once for the option and once for > the
argument.
Thanks for the clarification. I had my suspicions.
> David, it is well known that modern C compilers emit huge
> amounts of badly misleading, totally bogus warnings by default.
Thanks for your opinion. I suspect that developers of modern
C compilers might have something to say about that.
> Please never report compiler warnings to any project unless you >have
checked that the code is really wrong,
I think i += 2 in the last part of the for loop specifier
might make the programmer's original intent more clear.
Something like:
for (i = 1; i < argc && argv[i][0] == '-'; i += 2) {
I can't imagine this change makes much difference at run time, however.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?60639>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/