]> granicus.if.org Git - git/commitdiff
mingw: avoid const warning
authorStepan Kasal <kasal@ucw.cz>
Sat, 7 Jun 2014 06:46:41 +0000 (08:46 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 10 Jun 2014 20:31:01 +0000 (13:31 -0700)
Fix const warnings in http-fetch.c and remote-curl.c main() where is
argv declared as const.

The fix should work for all future declarations of main, no matter
whether the second parameter's type is "char**", "const char**", or
"char *[]".

Signed-off-by: Stepan Kasal <kasal@ucw.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/mingw.h

index 15f0c9d790f4da850c98f2da0571955f922a2114..6dc8b1a1b465fde69d6b71fc25e1effc6d6456ff 100644 (file)
@@ -372,7 +372,7 @@ static int mingw_main(c,v); \
 int main(int argc, char **argv) \
 { \
        mingw_startup(); \
-       return mingw_main(__argc, __argv); \
+       return mingw_main(__argc, (void *)__argv); \
 } \
 static int mingw_main(c,v)