From: Ramsay Jones <ramsay@ramsay1•demon.co.uk>
To: Junio C Hamano <gitster@pobox•com>
Cc: GIT Mailing-list <git@vger•kernel.org>, tboegi@web•de
Subject: [PATCH RESEND v2] path: Fix a sparse warning
Date: Mon, 27 May 2013 20:24:56 +0100 [thread overview]
Message-ID: <51A3B308.6000201@ramsay1.demon.co.uk> (raw)
On MinGW, sparse issues an "'get_st_mode_bits' not declared. Should
it be static?" warning. The MinGW and MSVC builds do not see the
declaration of this function, within git-compat-util.h, due to its
placement within an preprocessor conditional.
In order to suppress the warning, we simply move the declaration to
the top level of the header.
Signed-off-by: Ramsay Jones <ramsay@ramsay1•demon.co.uk>
---
Hi Junio,
Now that v1.8.3 is out, I note that this patch seems to have been
dropped (or did I miss something?).
This used to be
[PATCH 2/6] path: Make the 'get_st_mode_bits' symbol a file static
but the change in implementation required a change in title.
This version simply moves the declaration so that the MinGW and
MSVC builds can see it.
ATB,
Ramsay Jones
git-compat-util.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/git-compat-util.h b/git-compat-util.h
index e955bb5..0e5e4f8 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -163,7 +163,6 @@
typedef long intptr_t;
typedef unsigned long uintptr_t;
#endif
-int get_st_mode_bits(const char *path, int *mode);
#if defined(__CYGWIN__)
#undef _XOPEN_SOURCE
#include <grp.h>
@@ -176,6 +175,8 @@ int get_st_mode_bits(const char *path, int *mode);
#endif
#endif
+extern int get_st_mode_bits(const char *path, int *mode);
+
/* used on Mac OS X */
#ifdef PRECOMPOSE_UNICODE
#include "compat/precompose_utf8.h"
--
1.8.3
next reply other threads:[~2013-05-27 19:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-27 19:24 Ramsay Jones [this message]
2013-05-28 17:04 ` [PATCH RESEND v2] path: Fix a sparse warning Junio C Hamano
2013-05-29 13:46 ` Torsten Bögershausen
2013-05-29 23:57 ` Ramsay Jones
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=51A3B308.6000201@ramsay1.demon.co.uk \
--to=ramsay@ramsay1$(echo .)demon.co.uk \
--cc=git@vger$(echo .)kernel.org \
--cc=gitster@pobox$(echo .)com \
--cc=tboegi@web$(echo .)de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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