Re: [PATCH v2 12/16] parse-options: replace opterror() with optname()
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Nov 10, 2018, 04:55 UTC
- Message-ID
- <CACsJy8CM=0Cw1WCamJJe8aapA4-mdr+rMmbjVpYYQCj2++NQbA@mail.gmail.com>
- In-Reply-To
- <d29c4fcc-0591-fc45-5a5d-65d2874d98a7@ramsayjones.plus.com>
On Tue, Nov 6, 2018 at 3:07 PM Ramsay Jones <ramsay@ramsayjones.plus.com> wrote:
Show 8 quoted lines
> 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. ;-)
I was making it static, but the compiler complained about undefined function and I would need to either move optname() up in parse-options.c or add a forward declaration (but I was going to _remove_ the declaration!)
Since it could be potentially used by Jeff's series (and I think it does have potential in parse-options-cb.c), I'll just leave it exported and caress your static-check.pl script (how did it not catch optbug() not being used outside parse-options.c either)?
-- Duy