X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=fsck.c;h=511b82cba9977c14d6dcba5efbd6d38591d3aacc;hb=2464456a6ac9216d59d9e2cf0d86fee072f63cf8;hp=0cf5f012bdfa876fae4e15ed9cb94ed304314bf6;hpb=500ac7f42e7f2ae42e33be3bbb7120b788175b1d;p=git.git diff --git a/fsck.c b/fsck.c index 0cf5f012b..511b82cba 100644 --- a/fsck.c +++ b/fsck.c @@ -148,20 +148,17 @@ static int fsck_tree(struct tree *item, int strict, fsck_error error_func) struct tree_desc desc; unsigned o_mode; const char *o_name; - const unsigned char *o_sha1; init_tree_desc(&desc, item->buffer, item->size); o_mode = 0; o_name = NULL; - o_sha1 = NULL; while (desc.size) { unsigned mode; const char *name; - const unsigned char *sha1; - sha1 = tree_entry_extract(&desc, &name, &mode); + tree_entry_extract(&desc, &name, &mode); if (strchr(name, '/')) has_full_path = 1; @@ -207,7 +204,6 @@ static int fsck_tree(struct tree *item, int strict, fsck_error error_func) o_mode = mode; o_name = name; - o_sha1 = sha1; } retval = 0; @@ -326,7 +322,7 @@ int fsck_error_function(struct object *obj, int type, const char *fmt, ...) die("this should not happen, your snprintf is broken"); } - error(sb.buf); + error("%s", sb.buf); strbuf_release(&sb); return 1; }