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

Re: [PATCH] refspec.h: reinstate 'extern' to fix sparse warning

From
BWBrandon Williams <bmwill@google.com>
Date
May 16, 2018, 21:42 UTC
Message-ID
<20180516214251.GA60301@google.com>
In-Reply-To
<29f60a43-9c95-512a-ef85-558906a08ed0@ramsayjones.plus.com>
On 05/16, Ramsay Jones wrote:
Show 14 quoted lines
> 
> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
> ---
> 
> Hi Brandon,
> 
> If you need to re-roll your 'bw/refspec-api' branch, could you please
> squash this, or the equivalent change before the 'struct refname' to
> 'struct refname_item' name change, into the relevant patch. (which
> would be patch #1, commit 8999381ed).
> 
> This patch was built on top of 'pu', but as I said above, patch #1
> is where the original 'extern' keyword was dropped. (see first hunk
> of the diff to 'remote.h').

Of course I'll do that, I'm planning on sending out a v2 by the end of the day and I'll incorporate that.

Though now I'm confused, I thought we were going towards eliminating using the extern keyword? ...of course I guess it means something _slightly_ different when using with a variable vs a function :)

Show 24 quoted lines
> 
> Thanks!
> 
> ATB,
> Ramsay Jones
> 
>  refspec.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/refspec.h b/refspec.h
> index 374f8ea63..7e1ff94ac 100644
> --- a/refspec.h
> +++ b/refspec.h
> @@ -2,7 +2,7 @@
>  #define REFSPEC_H
>  
>  #define TAG_REFSPEC "refs/tags/*:refs/tags/*"
> -const struct refspec_item *tag_refspec;
> +extern const struct refspec_item *tag_refspec;
>  
>  struct refspec_item {
>  	unsigned force : 1;
> -- 
> 2.17.0
-- 
Brandon Williams
Previous: Ramsay JonesNext: Stefan Beller
Message 2 of 4 in “refspec.h: reinstate 'extern' to fix sparse warning”
  1. refspec.h: reinstate 'extern' to fix sparse warningRamsay Jones, May 16, 2018
  2. Brandon WilliamsMay 16, 2018
  3. Stefan BellerMay 16, 2018
  4. Johannes SchindelinMay 16, 2018

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.