From: Jeff King Date: Thu, 23 Jan 2014 01:28:30 GMT Subject: [PATCH 2/3] repack: make parsed string options const-correct Message-ID: <20140123012830.GB19472@sigill.intra.peff.net> In-Reply-To: <20140123012656.GC17254@sigill.intra.peff.net> 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 --- Not a big deal, but just for consistency with the next patch. builtin/repack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/repack.c b/builtin/repack.c index 528725b..7f89c7c 100644 --- a/builtin/repack.c +++ b/builtin/repack.c @@ -129,7 +129,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix) /* variables to be filled by option parsing */ int pack_everything = 0; int delete_redundant = 0; - char *unpack_unreachable = NULL; + const char *unpack_unreachable = NULL; int window = 0, window_memory = 0; int depth = 0; int max_pack_size = 0; -- 1.8.5.2.500.g8060133