Skip to content

Commit e5ebc9a

Browse files
jeffhostetlerdscho
authored andcommitted
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>
1 parent db5aa8b commit e5ebc9a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

compat/mingw.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1392,7 +1392,10 @@ static int try_shell_exec(const char *cmd, char *const *argv)
13921392
prog = path_lookup(interpr, 1);
13931393
if (prog) {
13941394
int argc = 0;
1395-
const char **argv2;
1395+
#ifndef _MSC_VER
1396+
const
1397+
#endif
1398+
char **argv2;
13961399
while (argv[argc]) argc++;
13971400
ALLOC_ARRAY(argv2, argc + 1);
13981401
argv2[0] = (char *)cmd; /* full path to the script file */

0 commit comments

Comments
 (0)