summaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorLibravatar Jeff Hostetler <jeffhost@microsoft.com>2019-06-19 14:06:02 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-06-20 14:03:05 -0700
commit12fb9bd85ee9e673c70df90cf5a926e82d98eda8 (patch)
tree84f64c73b824caf5ea6eae17d0ba9fda7d9bd722 /compat
parentmsvc: define O_ACCMODE (diff)
downloadtgif-12fb9bd85ee9e673c70df90cf5a926e82d98eda8.tar.xz
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')
-rw-r--r--compat/mingw.c5
1 files changed, 4 insertions, 1 deletions
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 */