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

Re: Warning message in remote.c when compiling

From
P1prpr 19xx <prpr19xx@gmail.com>
Date
Apr 7, 2024, 16:47 UTC
Message-ID
<CAA1AqduFP-eXgVyiqJcJuThBQ8FD6ZfQbcoEUWU_++hNW8rfMQ@mail.gmail.com>
In-Reply-To
<xmqqzfu5hgs6.fsf@gitster.g>
On Sun, 7 Apr 2024 at 06:40, Junio C Hamano <gitster@pobox.com> wrote:
Show 16 quoted lines
>
> Jeff King <peff@peff.net> writes:
>
> > I don't really see any need to mark the wrapper as inline. It's one
> > basic function call (on top of an interface which requires a callback
> > anyway!), and I suspect many compilers would consider inlining anyway,
> > since it's a static function.
> >
> > Ditto for remotes_pushremote_get(), though it doesn't have a forward
> > declaration.
>
> Yup.  I presonally feel that we should get rid of "static inline"
> unless they appear in header files.  The compilers should in general
> be able to do good enough job finding what to inline than we can (1)
> initially mark what to inline, and (2) update by dropping "inline"
> that is no longer appropriate as the code evolves.

The compiler is an ancient gcc 4.2.0 cross-compiler for a mipsel-linux-uclibc environment. It doesn't really matter though, as folk seem to agree the definition and declaration should match, which I think they should. I also agree that having inline probably makes no sense, as the compiler can usually work this stuff out itself. So I don't mind whether all the inlines get removed or they all stay, as long as they are all effectively consistent, which they are currently not, and the compiler righty (to my mind) complains.

Thanks.
Previous: Junio C Hamano
Message 6 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.