From: Ben Walton <bwalton@artsci.utoronto.ca>
To: git@vger.kernel.org, gitster@pobox.com
Cc: Ben Walton <bwalton@artsci.utoronto.ca>
Subject: [PATCH] Change include order in two compat/ files to avoid compiler warning
Date: Sat, 4 Feb 2012 20:08:27 -0500 [thread overview]
Message-ID: <1328404107-15757-1-git-send-email-bwalton@artsci.utoronto.ca> (raw)
The inet_ntop and inet_pton compatibility wrapper source files
included system headers before git-compat-utils.h. This was causing a
warning on Solaris as _FILE_OFFSET_BITS was being redefined in
git-compat-utils.h. Including git-compat-utils.h first avoids the
warnings.
Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
---
I verified that this re-ordering doesn't affect either the build or the
test suite completion on both i386 and sparc. I think the ordering is
simply the result of placing the git-compat-utils.h include where some
others were removed in da523cc597b1.
compat/inet_ntop.c | 4 +---
compat/inet_pton.c | 4 +---
2 files changed, 2 insertions(+), 6 deletions(-)
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>
diff --git a/compat/inet_pton.c b/compat/inet_pton.c
index 2ec995e..1d44a5d 100644
--- a/compat/inet_pton.c
+++ b/compat/inet_pton.c
@@ -15,11 +15,9 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#include "../git-compat-util.h"
#include <errno.h>
#include <sys/types.h>
-
-#include "../git-compat-util.h"
-
#include <stdio.h>
#include <string.h>
--
1.7.8.3
next reply other threads:[~2012-02-05 1:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-05 1:08 Ben Walton [this message]
2012-02-05 20:41 ` [PATCH] Change include order in two compat/ files to avoid compiler warning Junio C Hamano
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=1328404107-15757-1-git-send-email-bwalton@artsci.utoronto.ca \
--to=bwalton@artsci.utoronto.ca \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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).