Web lists-archives.com

Re: [PATCH v2 12/16] parse-options: replace opterror() with optname()

On Tue, Nov 06, 2018 at 02:02:42PM +0000, Ramsay Jones wrote:

> Also, this patch does not replace opterror() calls outside of
> the 'parse-options.c' file with optname(). This tickles my
> static-check.pl script, since optname() is an external function
> which is only called from 'parse-options.c'.
> So, at present, optname() could be marked as a local 'static'
> symbol. However, I could also imagine it being used by new callers
> outside of 'parse-options.c' in the future. (maybe) Your call. ;-)

One potential caller is the BUG() cases I added in:


I actually thought about factoring out an optname() there, but saw that
it involved memory ownership issues and punted (since those messages are
just BUG()s anyway, and unlikely to be triggered). But if we have it, we
could use it.