Enable clang integer sanitizer and clean up a few warnings.
authorPetteri Aimonen <jpa@git.mail.kapsi.fi>
Fri, 9 Dec 2016 16:57:08 +0000 (18:57 +0200)
committerPetteri Aimonen <jpa@git.mail.kapsi.fi>
Fri, 9 Dec 2016 16:57:08 +0000 (18:57 +0200)
commit58af4d1fb733c5348b68dd3980f2a230d95400b4
tree2d70ebb12e34a4e55fbc369344d98c4e7dc4958f
parent66a5f06c985537a7e45969c52260b083ec04e82b
Enable clang integer sanitizer and clean up a few warnings.

Changed to use simple indexing instead of while (count--) in buf_read()/buf_write(),
because the count overflowed from 0 to max on the last iteration. While the unsigned
integer overflow is defined and behaviour was correct, making this simple change
allowed enabling the sanitizer which might catch true errors elsewhere in the code.
pb_decode.c
pb_encode.c
tests/SConstruct