repack: make parsed string options const-correct
When we use OPT_STRING to parse an option, we get back a pointer into the argv array, which should be "const char *". The compiler doesn't notice because it gets passed through a "void *" in the option struct. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King committed
Jan 22, 2014 at 20:28 UTC
aa8bd519dbf044f4b54a365c9c80c6eb9a1ee2ea
1 file changed
+1
-1
builtin/repack.c
+1
-1
@@ -129,7 +129,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
129
/* variables to be filled by option parsing */
130
int pack_everything = 0;
131
int delete_redundant = 0;
132
- char *unpack_unreachable = NULL;
132
+ const char *unpack_unreachable = NULL;
133
int window = 0, window_memory = 0;
134
int depth = 0;
135
int max_pack_size = 0;