diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2016-02-23 12:18:48 +0100 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2016-02-23 12:25:25 +0100 |
commit | dbc71dc05ef100a3907e6b47764b8eff71f1c7f3 (patch) | |
tree | 6381d8a0b08e9ce360a6f2d7ad9a4082693664fb /libdm | |
parent | 293aabe4cd43a80fa94d7adb009fb8ab6c9d3641 (diff) | |
download | lvm2-dbc71dc05ef100a3907e6b47764b8eff71f1c7f3.tar.gz |
gcc: cleanup some sign warnings
When comparing unsigned with int, the comparision is made
as 'unsigned' type, so make it rather explicit which type
is being compared.
Diffstat (limited to 'libdm')
-rw-r--r-- | libdm/mm/pool-fast.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libdm/mm/pool-fast.c b/libdm/mm/pool-fast.c index e7fedfcfd..65ca856a0 100644 --- a/libdm/mm/pool-fast.c +++ b/libdm/mm/pool-fast.c @@ -100,7 +100,7 @@ void *dm_pool_alloc_aligned(struct dm_pool *p, size_t s, unsigned alignment) _align_chunk(c, alignment); /* have we got room ? */ - if (!c || (c->begin > c->end) || (c->end - c->begin < s)) { + if (!c || (c->begin > c->end) || ((c->end - c->begin) < (int) s)) { /* allocate new chunk */ size_t needed = s + alignment + sizeof(struct chunk); c = _new_chunk(p, (needed > p->chunk_size) ? @@ -177,7 +177,7 @@ int dm_pool_begin_object(struct dm_pool *p, size_t hint) if (c) _align_chunk(c, align); - if (!c || (c->begin > c->end) || (c->end - c->begin < hint)) { + if (!c || (c->begin > c->end) || ((c->end - c->begin) < (int) hint)) { /* allocate a new chunk */ c = _new_chunk(p, hint > (p->chunk_size - sizeof(struct chunk)) ? @@ -200,7 +200,7 @@ int dm_pool_grow_object(struct dm_pool *p, const void *extra, size_t delta) if (!delta) delta = strlen(extra); - if (c->end - (c->begin + p->object_len) < delta) { + if ((c->end - (c->begin + p->object_len)) < (int) delta) { /* move into a new chunk */ if (p->object_len + delta > (p->chunk_size / 2)) nc = _new_chunk(p, (p->object_len + delta) * 2); |