git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] path.c: make 'common_list' a file local symbol

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 1, 2015, 18:06 UTC
Message-ID
<xmqqegiirp4g.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<55E5CA21.5080306@ramsayjones.plus.com>
Ramsay Jones <ramsay@ramsayjones.plus.com> writes:
Show 21 quoted lines
> Commit 04afda89 ("refs: clean up common_list", 26-08-2015) changed
> the type of the 'common_list' symbol from an array of 'formatted'
> strings to an array of struct containing the same data. However, in
> addition it also (inadvertently) changed the visibility of the
> symbol from file local to external.
>
> In order to revert the visibility of the symbol to file local, add
> the static modifier to the declaration of 'common_list'.
>
> Noticed by sparse (symbol 'common_list' was not declared. Should it
> be static?).
>
> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
> ---
>
> Hi David,
>
> If you need to re-roll the patches on your 'dt/refs-bisection' branch, could you
> please squash this into the relevant patch.
>
> Thanks!
Thanks.  I've squashed this into David's [v5 1/3] while queuing.
Show 20 quoted lines
>
> ATB,
> Ramsay Jones
>
>  path.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/path.c b/path.c
> index 9d32d19..a80eaf7 100644
> --- a/path.c
> +++ b/path.c
> @@ -100,7 +100,7 @@ struct common_dir {
>      const char *dirname;
>  };
>  
> -struct common_dir common_list[] = {
> +static struct common_dir common_list[] = {
>      { 0, 1, 0, "branches" },
>      { 0, 1, 0, "hooks" },
>      { 0, 1, 0, "info" },
Previous: Ramsay Jones
Message 2 of 2 in “path.c: make 'common_list' a file local symbol”
  1. path.c: make 'common_list' a file local symbolRamsay Jones, Sep 1, 2015
  2. Junio C HamanoSep 1, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.