From: Jeff Hostetler Date: Wed, 19 Jun 2019 21:06:02 +0000 (-0700) Subject: msvc: mark a variable as non-const X-Git-Tag: v2.23.0-rc0~58^2~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=12fb9bd85ee9e673c70df90cf5a926e82d98eda8;p=thirdparty%2Fgit.git msvc: mark a variable as non-const VS2015 complains when using a const pointer in memcpy()/free(). Signed-off-by: Jeff Hostetler Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- diff --git a/compat/mingw.c b/compat/mingw.c index 0d8713e515..d14d33308d 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -1553,7 +1553,10 @@ static int try_shell_exec(const char *cmd, char *const *argv) if (prog) { int exec_id; int argc = 0; - const char **argv2; +#ifndef _MSC_VER + const +#endif + char **argv2; while (argv[argc]) argc++; ALLOC_ARRAY(argv2, argc + 1); argv2[0] = (char *)cmd; /* full path to the script file */