summaryrefslogtreecommitdiff
path: root/commit-slab.h
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2017-10-23 14:20:18 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-10-23 14:20:18 +0900
commit7186408f2486ebbb82736c15efb8fbc372fb5f95 (patch)
treeb17026dbf30f239cbb390e0ee33b109ef69b0370 /commit-slab.h
parentMerge branch 'ma/ts-cleanups' into maint (diff)
parentALLOC_GROW: avoid -Wsign-compare warnings (diff)
downloadtgif-7186408f2486ebbb82736c15efb8fbc372fb5f95.tar.xz
Merge branch 'rj/no-sign-compare' into maint
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); \