Fixes clang warning:
circ_buf.c:49:9: warning: variable 'count' set but not used [-Wunused-but-set-variable]
size_t count = 0;
^
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Pointer arithmetic should not be done on void pointers.
circ_buf.c: In function ‘circ_read’:
circ_buf.c:104:25: warning: pointer of type ‘void *’ used in subtraction [-Wpointer-arith]
104 | return (void*)p - buf;
| ^
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Code should avoid comparing signed and unsigned integers, because of
implicit case.
circ_buf.c: In function ‘circ_fill’:
circ_buf.c:69:20: warning: comparison of integer expressions of different signedness: ‘ssize_t’ {aka ‘long int’} and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
69 | } while (n != space);
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>