From: Jeff King Date: Sat, 07 Jan 2017 01:36:02 GMT Subject: Re: [PATCH 4/5] unpack-trees: factor file removal out of check_updates Message-ID: <20170107013602.act7aouuzgzpwb54@sigill.intra.peff.net> In-Reply-To: <20170106210330.31761-5-sbeller@google.com> On Fri, Jan 06, 2017 at 01:03:29PM -0800, Stefan Beller wrote: > +static int remove_workingtree_files(struct unpack_trees_options *o, > + struct progress *progress) > +{ > + int i; > + unsigned cnt = 0; > + struct index_state *index = &o->result; > + > + for (i = 0; i < index->cache_nr; i++) { > + const struct cache_entry *ce = index->cache[i]; > + > + if (ce->ce_flags & CE_WT_REMOVE) { > + display_progress(progress, ++cnt); > + if (o->update && !o->dry_run) > + unlink_entry(ce); > + } > + } > + > + return cnt; > +} "cnt" is unsigned here, as it is in the caller. Should the return value match? -Peff