Code

hash-object.c: type-fix to squelch compiler warnings.
authorJunio C Hamano <junkio@cox.net>
Mon, 28 Nov 2005 11:19:03 +0000 (03:19 -0800)
committerJunio C Hamano <junkio@cox.net>
Tue, 29 Nov 2005 07:13:03 +0000 (23:13 -0800)
Signed-off-by: Junio C Hamano <junkio@cox.net>
hash-object.c

index c3d05a853a5518d2800eb65a00c181f6d8ab312f..ccba11cb32fb6989c9c0365097de2fa39197de25 100644 (file)
@@ -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);