diff options
author | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2016-10-21 15:28:24 +0200 |
---|---|---|
committer | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2016-10-21 15:28:24 +0200 |
commit | d5a52f3951fff7ee272bd0d4cd95cd122d07fa64 (patch) | |
tree | d32f6d89550a7b8606c78c241b73b23a39ae8bed /src/lib/bitmap.c | |
parent | 482c44232d4deda3f89a7d85fbad99c1c64e80ec (diff) | |
download | ouroboros-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.c | 4 |
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; |