mirror of
https://github.com/git/git.git
synced 2026-02-11 02:08:39 +00:00
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:
@@ -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); \
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user