diff --git a/builtin/rev-list.c b/builtin/rev-list.c index d320b6f1e3..6f5b9b0847 100644 --- a/builtin/rev-list.c +++ b/builtin/rev-list.c @@ -536,7 +536,7 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix) mark_edges_uninteresting(&revs, show_edge); if (bisect_list) { - int reaches = reaches, all = all; + int reaches, all; find_bisection(&revs.commits, &reaches, &all, bisect_find_all); diff --git a/fast-import.c b/fast-import.c index 58ef360da4..b5db5d20b1 100644 --- a/fast-import.c +++ b/fast-import.c @@ -3005,7 +3005,7 @@ static void cat_blob(struct object_entry *oe, struct object_id *oid) static void parse_get_mark(const char *p) { - struct object_entry *oe = oe; + struct object_entry *oe; char output[GIT_MAX_HEXSZ + 2]; /* get-mark SP LF */ @@ -3022,7 +3022,7 @@ static void parse_get_mark(const char *p) static void parse_cat_blob(const char *p) { - struct object_entry *oe = oe; + struct object_entry *oe; struct object_id oid; /* cat-blob SP LF */ diff --git a/merge-recursive.c b/merge-recursive.c index 2f232ad3b4..869092f7b9 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -2090,7 +2090,7 @@ int merge_recursive(struct merge_options *o, { struct commit_list *iter; struct commit *merged_common_ancestors; - struct tree *mrtree = mrtree; + struct tree *mrtree; int clean; if (show(o, 4)) { diff --git a/read-cache.c b/read-cache.c index a5dc7c7e67..59a73f4a81 100644 --- a/read-cache.c +++ b/read-cache.c @@ -2110,13 +2110,15 @@ static int ce_write_entry(git_hash_ctx *c, int fd, struct cache_entry *ce, struct strbuf *previous_name, struct ondisk_cache_entry *ondisk) { int size; - int saved_namelen = saved_namelen; /* compiler workaround */ int result; + unsigned int saved_namelen; + int stripped_name = 0; static unsigned char padding[8] = { 0x00 }; if (ce->ce_flags & CE_STRIP_NAME) { saved_namelen = ce_namelen(ce); ce->ce_namelen = 0; + stripped_name = 1; } if (ce->ce_flags & CE_EXTENDED) @@ -2156,7 +2158,7 @@ static int ce_write_entry(git_hash_ctx *c, int fd, struct cache_entry *ce, strbuf_splice(previous_name, common, to_remove, ce->name + common, ce_namelen(ce) - common); } - if (ce->ce_flags & CE_STRIP_NAME) { + if (stripped_name) { ce->ce_namelen = saved_namelen; ce->ce_flags &= ~CE_STRIP_NAME; }