Fix sign-compare errors
BIT_STRING.c:494:45: error: signed and unsigned type in conditional expression [-Werror=sign-compare]
BIT_STRING.c:580:46: error: signed and unsigned type in conditional expression [-Werror=sign-compare]
diff --git a/skeletons/BIT_STRING.c b/skeletons/BIT_STRING.c
index 1a76f47..522d13a 100644
--- a/skeletons/BIT_STRING.c
+++ b/skeletons/BIT_STRING.c
@@ -491,7 +491,7 @@
size_in_bits - csiz->lower_bound, csiz->effective_bits);
ret = per_put_few_bits(
po,
- add_trailer ? csiz->lower_bound : size_in_bits - csiz->lower_bound,
+ add_trailer ? csiz->lower_bound : (ssize_t)size_in_bits - csiz->lower_bound,
csiz->effective_bits);
if(ret) ASN__ENCODE_FAILED;
ret = per_put_many_bits(po, st->buf, size_in_bits);
@@ -577,7 +577,7 @@
if(pc->flags & APC_CONSTRAINED) {
long suggested_upper_bound = pc->upper_bound < (ssize_t)max_length
? pc->upper_bound
- : max_length;
+ : (ssize_t)max_length;
if(max_length < (size_t)pc->lower_bound) {
return result_skipped;
}