From: Junio C Hamano Date: Mon, 28 Nov 2005 11:19:03 +0000 (-0800) Subject: hash-object.c: type-fix to squelch compiler warnings. X-Git-Tag: v0.99.9l^2~23^2 X-Git-Url: https://git.octo.it/?p=git.git;a=commitdiff_plain;h=99e01692063cc48adee19e1f738472a579c14ca2 hash-object.c: type-fix to squelch compiler warnings. Signed-off-by: Junio C Hamano --- diff --git a/hash-object.c b/hash-object.c index c3d05a85..ccba11cb 100644 --- a/hash-object.c +++ b/hash-object.c @@ -29,7 +29,7 @@ int main(int argc, char **argv) int i; const char *type = "blob"; int write_object = 0; - const char *prefix; + const char *prefix = NULL; int prefix_length = -1; for (i = 1 ; i < argc; i++) { @@ -46,7 +46,7 @@ int main(int argc, char **argv) write_object = 1; } else { - char *arg = argv[i]; + const char *arg = argv[i]; if (0 <= prefix_length) arg = prefix_filename(prefix, prefix_length, arg);