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

(unknown)

From
Ben Walton <bwalton@artsci.utoronto.ca>
Date
Feb 5, 2012, 22:32 UTC
Message-ID
<1328481141-21037-1-git-send-email-bwalton@artsci.utoronto.ca>
In-Reply-To
<7vr4y9ggij.fsf@alter.siamese.dyndns.org>
Hi Junio,
Show 20 quoted lines
> > diff --git a/compat/inet_ntop.c b/compat/inet_ntop.c
> > index 60b5a1d..f1bf81c 100644
> > --- a/compat/inet_ntop.c
> > +++ b/compat/inet_ntop.c
> > @@ -15,11 +15,9 @@
> >   * SOFTWARE.
> >   */
> >
> > +#include "../git-compat-util.h"
> >  #include <errno.h>
> >  #include <sys/types.h>
> > -
> > -#include "../git-compat-util.h"
> > -
> >  #include <stdio.h>
> >  #include <string.h>
> 
> I actually have to wonder if any of these four inclusion of the
> system headers are warranted. Wouldn't they be included as part of
> git-compat-util.h anyway?

Yes, you're correct. Dropping the system includes is correct as opposed to rearranging the order. Updated patch to follow.

Thanks -Ben

Previous: Junio C HamanoNext: Ben Walton
Message 3 of 4 in “Change include order in two compat/ files to avoid compiler warning”
  1. Change include order in two compat/ files to avoid compiler warningBen Walton, Feb 5, 2012
  2. Junio C HamanoFeb 5, 2012
  3. (unknown)Ben Walton, Feb 5, 2012
  4. Drop system includes from inet_pton/inet_ntop compatibility wrappersBen Walton, Feb 5, 2012

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.