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

Re: Warning message in remote.c when compiling

From
DSDragan Simic <dsimic@manjaro.org>
Date
Apr 6, 2024, 16:12 UTC
Message-ID
<7f0da057773d39add4ede71667e9ff70@manjaro.org>
In-Reply-To
<CAA1Aqdvj6Eyp9jGaAxTf8p0Eh_rCPydOpin3D5QYHy8sqOoOsw@mail.gmail.com>
Hello,
On 2024-04-06 16:21, prpr 19xx wrote:
Show 10 quoted lines
> I get this warning message when compiling remote.c:
> 
> ...
>     CC remote.o
> remote.c:596: warning: 'remotes_remote_get' declared inline after being 
> called
> remote.c:596: warning: previous declaration of 'remotes_remote_get' was 
> here
>     CC replace-object.o
> ...

Could you, please, provide more details about your environment, i.e. the operating system and compiler?

Show 21 quoted lines
> This is from the "master" branch, but it's the same on "next". It's
> easily fixed with this patch:
> 
> diff --git a/remote.c b/remote.c
> index 2b650b8..347f504 100644
> --- a/remote.c
> +++ b/remote.c
> @@ -592,7 +592,7 @@ const char *pushremote_for_branch(struct branch
> *branch, int *explicit)
>                                              branch, explicit);
>  }
> 
> -static struct remote *remotes_remote_get(struct remote_state 
> *remote_state,
> +static inline struct remote *remotes_remote_get(struct remote_state
> *remote_state,
>                                          const char *name);
> 
>  const char *remote_ref_for_branch(struct branch *branch, int for_push)
> 
> Thanks.
Previous: prpr 19xxNext: Jeff King
Message 2 of 6 in “Warning message in remote.c when compiling”
  1. prpr 19xxApr 6, 2024
  2. Dragan SimicApr 6, 2024
  3. Jeff KingApr 7, 2024
  4. Dragan SimicApr 7, 2024
  5. Junio C HamanoApr 7, 2024
  6. prpr 19xxApr 7, 2024

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.