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

Re: [PATCH 2/2] remote-odb: un-inline function remote_odb_reinit

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Jul 24, 2018, 21:59 UTC
Message-ID
<20180724215953.GD136514@aiede.svl.corp.google.com>
In-Reply-To
<20180724215223.27516-3-dev+git@drbeat.li>
Hi,
Beat Bolli wrote:
Show 16 quoted lines
> When compiling under Apple LLVM version 9.1.0 (clang-902.0.39.2) with
> "make DEVELOPER=1 DEVOPTS=pedantic", the compiler says
>
>     remote-odb.c:87:2: error: static function 'remote_odb_do_init' is
>     used in an inline function with external linkage
>     [-Werror,-Wstatic-in-inline]
>
> Remove the inline specifier that would only make sense if
> remote_odb_reinit were defined in the header file. Moving it into the
> header is not possible because the called function remote_odb_do_init is
> static and thus not visible from the includers of the header.
>
> Signed-off-by: Beat Bolli <dev+git@drbeat.li>
> ---
>  remote-odb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
What branch does this apply to?
[...]
Show 8 quoted lines
> --- a/remote-odb.c
> +++ b/remote-odb.c
> @@ -82,7 +82,7 @@ static inline void remote_odb_init(void)
>  	remote_odb_do_init(0);
>  }
>  
> -inline void remote_odb_reinit(void)
> +void remote_odb_reinit(void)

This looks like an oversight in https://public-inbox.org/git/20180713174959.16748-6-chriscool@tuxfamily.org/: there isn't any reason for this function to be inline.

Christian, can you squash it in on your next reroll?

Thanks, Jonathan

Previous: Beat BolliNext: Beat Bolli
Message 3 of 8 in “Pedantic fixes for Apple clang”
  1. 0/2 Pedantic fixes for Apple clangBeat Bolli, Jul 24, 2018
  2. 2/2 remote-odb: un-inline function remote_odb_reinitBeat Bolli, Jul 24, 2018
  3. Jonathan NiederJul 24, 2018
  4. Beat BolliJul 24, 2018
  5. Christian CouderJul 25, 2018
  6. Junio C HamanoJul 25, 2018
  7. 1/2 packfile: drop a repeated enum declarationBeat Bolli, Jul 24, 2018
  8. Jonathan NiederJul 24, 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.