signedness: Fix less obvious issues
* My compilers mark these as errors * Attempt to be more correct * Tested on gcc-5.2.0 and clang-3.6.2
This commit is contained in:
parent
e933510236
commit
376b63fb81
6 changed files with 15 additions and 15 deletions
|
|
@ -79,7 +79,7 @@ int capn_deflate(struct capn_stream* s) {
|
|||
continue;
|
||||
|
||||
default:
|
||||
if (s->avail_out < 1 + sz)
|
||||
if (s->avail_out < 1U + sz)
|
||||
return CAPN_NEED_MORE;
|
||||
|
||||
*(s->next_out++) = hdr;
|
||||
|
|
@ -166,7 +166,7 @@ int capn_inflate(struct capn_stream* s) {
|
|||
if (hdr & (1 << i))
|
||||
sz++;
|
||||
}
|
||||
if (s->avail_in < 2 + sz)
|
||||
if (s->avail_in < 2U + sz)
|
||||
return CAPN_NEED_MORE;
|
||||
|
||||
s->next_in += 2;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue