Re: [PATCH 1/2] ref-filter: mark a file-local symbol as static
- From
Ramsay Jones <ramsay@ramsayjones.plus.com>
- Date
- Mar 2, 2018, 17:06 UTC
- Message-ID
- <733494ed-56b1-9072-3c9d-cedc35acd215@ramsayjones.plus.com>
- In-Reply-To
- <20180302035904.GA238112@aiede.svl.corp.google.com>
On 02/03/18 03:59, Jonathan Nieder wrote:
Show 20 quoted lines
> Hi,
>
> Ramsay Jones wrote:
>
>> Commit fcfba37337 ('ref-filter: make "--contains <id>" less chatty if
>> <id> is invalid', 2018-02-23) added the add_str_to_commit_list()
>> function, which causes sparse to issue a "... not declared. Should it
>> be static?" warning for that symbol.
>
> Thanks for catching it!
>
>> In order to suppress the warning, mark that function as static.
>
> Isn't this closer to
>
> Indeed, the function is only used in this one compilation
> unit. Mark it static.
>
> ? In other words, sparse's warning is accurate, and this is not about
> trying to quiet a false positive but about addressing a true positive.I thought that was implied by the commit subject line. :-D
However, it certainly doesn't hurt to be more explicit.
Junio, do you want me to re-roll, or would you mind tweaking the commit message while queueing?
Thanks!
ATB, Ramsay Jones