Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRamsay Jones <ramsay@ramsayjones.plus.com>2017-09-21 19:47:36 +0300
committerJunio C Hamano <gitster@pobox.com>2017-09-22 07:00:36 +0300
commitfddfedc361b56195503d885874ed1162f66c773c (patch)
treeed5e09c03cfafca1db5bfa385f06e6d76a7414a3 /commit-slab.h
parent73560c793a08b389cc8ad5930db2cebb858affcb (diff)
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>
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); \