Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorJeff Hostetler <jeffhost@microsoft.com>2019-06-20 00:06:02 +0300
committerJunio C Hamano <gitster@pobox.com>2019-06-21 00:03:05 +0300
commit12fb9bd85ee9e673c70df90cf5a926e82d98eda8 (patch)
tree84f64c73b824caf5ea6eae17d0ba9fda7d9bd722 /compat
parenta822fb853a60c9a13438d6351622b62501de5a32 (diff)
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 0d8713e515c..d14d33308d6 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 */