summaryrefslogtreecommitdiff
path: root/commit-slab.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-09-29 11:23:42 +0900
committerJunio C Hamano <gitster@pobox.com>2017-09-29 11:23:42 +0900
commit14a8168e2fed3934f1f9afb286f1c64345d06790 (patch)
treefc622bb0da0f89762a03bf6bb17b3bdc66e7eb92 /commit-slab.h
parentd4d262d19e118faf29df842b752144da7c7af02e (diff)
parent071bcaab6480dea80a47f574f61dc2cd9518e7dc (diff)
downloadgit-14a8168e2fed3934f1f9afb286f1c64345d06790.tar.gz
Merge branch 'rj/no-sign-compare'
Many codepaths have been updated to squelch -Wsign-compare warnings. * rj/no-sign-compare: ALLOC_GROW: avoid -Wsign-compare warnings cache.h: hex2chr() - avoid -Wsign-compare warnings commit-slab.h: avoid -Wsign-compare warnings git-compat-util.h: xsize_t() - avoid -Wsign-compare warnings
Diffstat (limited to 'commit-slab.h')
-rw-r--r--commit-slab.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/commit-slab.h b/commit-slab.h
index 333d81e370..dcaab8ca04 100644
--- a/commit-slab.h
+++ b/commit-slab.h
@@ -78,7 +78,7 @@ static MAYBE_UNUSED void init_ ##slabname(struct slabname *s) \
\
static MAYBE_UNUSED void clear_ ##slabname(struct slabname *s) \
{ \
- int i; \
+ unsigned int i; \
for (i = 0; i < s->slab_count; i++) \
free(s->slab[i]); \
s->slab_count = 0; \
@@ -89,13 +89,13 @@ static MAYBE_UNUSED elemtype *slabname## _at_peek(struct slabname *s, \
const struct commit *c, \
int add_if_missing) \
{ \
- int nth_slab, nth_slot; \
+ unsigned int nth_slab, nth_slot; \
\
nth_slab = c->index / s->slab_size; \
nth_slot = c->index % s->slab_size; \
\
if (s->slab_count <= nth_slab) { \
- int i; \
+ unsigned int i; \
if (!add_if_missing) \
return NULL; \
REALLOC_ARRAY(s->slab, nth_slab + 1); \