On 2022-12-09 17:48, Gavin Smith wrote:
Since I went through the process of making all the symbols in that file
(besides main) local, here's the patch that does that
Thanks but no thanks.  install-info.c is a single-file program so there's
no point in adding the static keyword everywhere.

On the contrary, not only can adding 'static' prevent future issues like this with other symbols, it can help compilers generate better code in cases where adding 'static' lets them easily infer that a function cannot be called from outside the current compilation unit.

As a general rule in C, it's good to make all symbols static unless they really need to be extern.

      • ... Eli Zaretskii
        • ... Arsen Arsenović via Bug reports for the GNU Texinfo documentation system
          • ... Eli Zaretskii
            • ... Bruno Haible
              • ... Eli Zaretskii
              • ... Arsen Arsenović
              • ... Paul Eggert
            • ... Arsen Arsenović
          • ... Gavin Smith
            • ... Gavin Smith
            • ... Paul Eggert
          • ... Jeffrey Walton
      • ... Florian Weimer
  • ... Arsen Arsenović

Reply via email to