summaryrefslogtreecommitdiff
path: root/src/lib/bitmap.c
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@intec.ugent.be>2016-10-21 15:28:24 +0200
committerdimitri staessens <dimitri.staessens@intec.ugent.be>2016-10-21 15:28:24 +0200
commitd5a52f3951fff7ee272bd0d4cd95cd122d07fa64 (patch)
treed32f6d89550a7b8606c78c241b73b23a39ae8bed /src/lib/bitmap.c
parent482c44232d4deda3f89a7d85fbad99c1c64e80ec (diff)
downloadouroboros-d5a52f3951fff7ee272bd0d4cd95cd122d07fa64.tar.gz
ouroboros-d5a52f3951fff7ee272bd0d4cd95cd122d07fa64.zip
build: Comply with -Wextra compiler flag
This reduces the risk for some bugs, for instance due to signed/unsigned mismatches and unused variables.
Diffstat (limited to 'src/lib/bitmap.c')
-rw-r--r--src/lib/bitmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/bitmap.c b/src/lib/bitmap.c
index e84145b2..916ab2ee 100644
--- a/src/lib/bitmap.c
+++ b/src/lib/bitmap.c
@@ -158,7 +158,7 @@ ssize_t bmp_allocate(struct bmp * b)
id = (ssize_t) find_next_zero_bit(b->bitmap,
b->size);
- if (id >= b->size)
+ if (id >= (ssize_t) b->size)
return bad_id(b);
bitmap_set(b->bitmap, id);
@@ -171,7 +171,7 @@ static bool is_id_valid(struct bmp * b,
{
assert(b);
- if ((id < b->offset) || (id > (b->offset + b->size)))
+ if ((id < b->offset) || (id > (ssize_t) (b->offset + b->size)))
return false;
return true;