git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Ben Walton <bwalton@artsci.utoronto.ca>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Change include order in two compat/ files to avoid compiler warning
Date: Sun, 05 Feb 2012 12:41:08 -0800	[thread overview]
Message-ID: <7vr4y9ggij.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <1328404107-15757-1-git-send-email-bwalton@artsci.utoronto.ca> (Ben Walton's message of "Sat, 4 Feb 2012 20:08:27 -0500")

Ben Walton <bwalton@artsci.utoronto.ca> writes:

> The inet_ntop and inet_pton compatibility wrapper source files
> included system headers before git-compat-utils.h.

Thanks, that is definitely a breakage.

> 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?

  reply	other threads:[~2012-02-05 20:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-05  1:08 [PATCH] Change include order in two compat/ files to avoid compiler warning Ben Walton
2012-02-05 20:41 ` Junio C Hamano [this message]
2012-02-05 22:32   ` (unknown), Ben Walton
2012-02-05 22:32     ` [PATCH] Drop system includes from inet_pton/inet_ntop compatibility wrappers Ben Walton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vr4y9ggij.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=bwalton@artsci.utoronto.ca \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).