1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-04-27 22:35:12 +02:00

commit-slab.h: avoid -Wsign-compare warnings

Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Ramsay Jones 2017-09-21 17:47:36 +01:00 committed by Junio C Hamano
parent 73560c793a
commit fddfedc361

View File

@ -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); \