bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #60639] src/utils/addftinfo/addftinfo.cpp:119: double increment ?


From: Ingo Schwarze
Subject: [bug #60639] src/utils/addftinfo/addftinfo.cpp:119: double increment ?
Date: Thu, 20 May 2021 18:08:01 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; OpenBSD amd64; rv:88.0) Gecko/20100101 Firefox/88.0

Follow-up Comment #4, bug #60639 (project groff):

[comment #3 comment #3:]

> I think i += 2 in the last part of the for loop specifier
> might make the programmer's original intent more clear.

Purely a matter of style, there are arguments both ways.
The existing code puts each increment close to the code
handling the respective argument, and your suggestion
would increase the risk of causing bugs when introducing
the first option that does not take an argument.

Changing code just because a compiler has suspicions is not a
good idea - unless the code is indeed unambiguously bad style
or buggy and the compiler merely finds a real problem.  But the
only question that ever matters is "is there a real problem
with the code" and never "does the compiler complain".  The
compiler is only a tool and must never be used blindly.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60639>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]