Followup for "Win32: move main macro to a function" for const correctness.

This handles const warnings that break the build raised by http-fetch and
remote-curl main functions that have different const arguments.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
This commit is contained in:
Pat Thoyts
2013-06-15 06:29:48 +01:00
parent e3f1d29519
commit 875eaea988
3 changed files with 5 additions and 3 deletions

View File

@@ -351,7 +351,7 @@ extern CRITICAL_SECTION pinfo_cs;
void mingw_startup();
#define main(c,v) dummy_decl_mingw_main(); \
static int mingw_main(c,v); \
int main(int argc, char **argv) \
int main(c,v) \
{ \
mingw_startup(); \
return mingw_main(__argc, __argv); \

View File

@@ -6,11 +6,12 @@
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 **av)
{
struct walker *walker;
int commits_on_stdin = 0;
int commits;
const char **argv = (const char **)av;
const char **write_ref = NULL;
char **commit_id;
char *url = NULL;

View File

@@ -866,9 +866,10 @@ static void parse_push(struct strbuf *buf)
free(specs);
}
int main(int argc, const char **argv)
int main(int argc, char **av)
{
struct strbuf buf = STRBUF_INIT;
const char **argv = (const char **)av;
int nongit;
git_extract_argv0_path(argv[0]);