summaryrefslogtreecommitdiff
path: root/compat/mingw.c
diff options
context:
space:
mode:
authorJeff Hostetler <jeffhost@microsoft.com>2019-06-19 21:06:02 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-06-20 21:03:05 (GMT)
commit12fb9bd85ee9e673c70df90cf5a926e82d98eda8 (patch)
tree84f64c73b824caf5ea6eae17d0ba9fda7d9bd722 /compat/mingw.c
parenta822fb853a60c9a13438d6351622b62501de5a32 (diff)
downloadgit-12fb9bd85ee9e673c70df90cf5a926e82d98eda8.zip
git-12fb9bd85ee9e673c70df90cf5a926e82d98eda8.tar.gz
git-12fb9bd85ee9e673c70df90cf5a926e82d98eda8.tar.bz2
msvc: mark a variable as non-const
VS2015 complains when using a const pointer in memcpy()/free(). Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat/mingw.c')
-rw-r--r--compat/mingw.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/compat/mingw.c b/compat/mingw.c
index 0d8713e..d14d333 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 */