From: Stepan Kasal <kasal@ucw.cz>
To: Karsten Blees <karsten.blees@gmail.com>
Cc: Marat Radchenko <marat@slonopotamus.org>,
GIT Mailing-list <git@vger.kernel.org>,
Felipe Contreras <felipe.contreras@gmail.com>,
Erik Faye-Lund <kusmabite@gmail.com>,
msysgit@googlegroups.com,
Pat Thoyts <patthoyts@users.sourceforge.net>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Johannes Sixt <j.sixt@viscovery.net>
Subject: Re: [PATCH 08/12] MINGW: fix main() signature in http-fetch.c and remote-curl.c
Date: Thu, 1 May 2014 00:17:28 +0200 [thread overview]
Message-ID: <20140430221728.GA27914@camelia.ucw.cz> (raw)
In-Reply-To: <5360B5EC.1070907@gmail.com>
Hello,
On Wed, Apr 30, 2014 at 10:35:56AM +0200, Karsten Blees wrote:
> Would you mind cross checking your changes with the msysgit fork?
> [...]
> See https://github.com/msysgit/git/commit/9206e7fd (squashed from
> https://github.com/msysgit/git/commit/0115ef83 and
> https://github.com/msysgit/git/commit/6949537a).
OK, I _did_ checked these, let's look at the two original commits:
- 0115ef83 is interesting, but not relevant to the warnings,
- 6949537a contains a fix for the const warning, plus it fixed a
minor nit in the other commit.
> [...] you to come up with an
> alternate solution for something that's long been fixed).
Long been fixed by a quick and dirty hack.
Marat's fix is nicer, can I ask some of the msysGit guys to ack it?
(Appended below for the new cc's here.)
Have a nice day,
Stepan
PS: I bet Dscho will be able to handle the conflict.
From: Marat Radchenko <marat@slonopotamus.org>
Subject: [PATCH 08/12] MINGW: fix main() signature in http-fetch.c and remote-curl.c
Date: Tue, 29 Apr 2014 13:12:02 +0400
On MinGW, compat/mingw.h defines a 'mingw_main' wrapper function.
Fix `warning: passing argument 2 of 'mingw_main' from incompatible
pointer type` in http-fetch.c and remote-curl.c by dropping 'const'.
Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
---
http-fetch.c | 5 +++--
remote-curl.c | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/http-fetch.c b/http-fetch.c
index ba3ea10..a6a9a2f 100644
--- a/http-fetch.c
+++ b/http-fetch.c
@@ -6,7 +6,7 @@
static const char http_fetch_usage[] = "git http-fetch "
"[-c] [-t] [-a] [-v] [--recover] [-w ref] [--stdin] commit-id url";
-int main(int argc, const char **argv)
+int main(int argc, char **argv)
{
struct walker *walker;
int commits_on_stdin = 0;
@@ -38,7 +38,8 @@ int main(int argc, const char **argv)
} else if (argv[arg][1] == 'v') {
get_verbosely = 1;
} else if (argv[arg][1] == 'w') {
- write_ref = &argv[arg + 1];
+ const char *ref = argv[arg + 1];
+ write_ref = &ref;
arg++;
} else if (argv[arg][1] == 'h') {
usage(http_fetch_usage);
diff --git a/remote-curl.c b/remote-curl.c
index 52c2d96..565b6c9 100644
--- a/remote-curl.c
+++ b/remote-curl.c
@@ -938,7 +938,7 @@ static void parse_push(struct strbuf *buf)
free(specs);
}
-int main(int argc, const char **argv)
+int main(int argc, char **argv)
{
struct strbuf buf = STRBUF_INIT;
int nongit;
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
next prev parent reply other threads:[~2014-04-30 22:17 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-29 9:11 [PATCH v2] MinGW(-W64) cross-compilation Marat Radchenko
2014-04-29 9:11 ` [PATCH 01/12] MINGW: compat/mingw.h: do not attempt to redefine lseek on mingw-w64 Marat Radchenko
2014-04-29 9:11 ` [PATCH 02/12] MSVC: config.mak.uname: drop -D__USE_MINGW_ACCESS from CFLAGS Marat Radchenko
2014-04-29 9:11 ` [PATCH 03/12] MINGW: compat/mingw.h: drop fork() definition Marat Radchenko
2014-04-29 9:11 ` [PATCH 04/12] MINGW: do not fail at redefining pid_t on MinGW-W64 Marat Radchenko
2014-04-29 9:11 ` [PATCH 05/12] MINGW: config.mak.uname: allow using cURL for non-msysGit builds Marat Radchenko
2014-04-29 9:12 ` [PATCH 06/12] MINGW: git-compat-util.h: use inttypes.h for printf macros Marat Radchenko
2014-04-29 9:12 ` [PATCH 07/12] MINGW: config.mak.uname: reorganize MINGW settings Marat Radchenko
2014-04-29 9:12 ` [PATCH 08/12] MINGW: fix main() signature in http-fetch.c and remote-curl.c Marat Radchenko
2014-04-30 8:35 ` Karsten Blees
2014-04-30 8:56 ` Erik Faye-Lund
2014-04-30 12:31 ` Johannes Schindelin
2014-04-30 16:38 ` Felipe Contreras
2014-04-30 22:17 ` Stepan Kasal [this message]
2014-04-30 22:28 ` [PATCH] Win32: move main macro to a function Stepan Kasal
2014-05-03 7:43 ` [PATCH 08/12] MINGW: fix main() signature in http-fetch.c and remote-curl.c Marat Radchenko
2014-04-29 9:12 ` [PATCH 09/12] Makefile: introduce CROSS_COMPILE variable Marat Radchenko
2014-04-29 9:12 ` [PATCH 10/12] MINGW: compat/poll/poll.c: undef NOGDI Marat Radchenko
2014-04-30 11:41 ` Stepan Kasal
2014-05-03 7:00 ` Marat Radchenko
2014-05-04 18:52 ` Stepan Kasal
2014-05-04 20:55 ` Marat Radchenko
2014-05-04 21:46 ` '502304919' via msysGit
2014-05-05 7:35 ` Stepan Kasal
2014-05-05 7:32 ` Felipe Contreras
2014-05-05 12:15 ` [msysGit] " Stepan Kasal
2014-05-04 20:14 ` Felipe Contreras
2014-04-29 9:12 ` [PATCH 11/12] compat/nedmalloc/malloc.c.h: fix compilation under MinGW-W64 Marat Radchenko
2014-04-29 9:12 ` [PATCH 12/12] MINGW: config.mak.uname: add explicit way to request MinGW-build Marat Radchenko
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=20140430221728.GA27914@camelia.ucw.cz \
--to=kasal@ucw.cz \
--cc=Johannes.Schindelin@gmx.de \
--cc=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
--cc=j.sixt@viscovery.net \
--cc=karsten.blees@gmail.com \
--cc=kusmabite@gmail.com \
--cc=marat@slonopotamus.org \
--cc=msysgit@googlegroups.com \
--cc=patthoyts@users.sourceforge.net \
/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).