From bf6e9587293b34d9f63a9f373a7b9b11604180f6 Mon Sep 17 00:00:00 2001 From: Mara Furland Date: Fri, 15 Nov 2024 11:50:35 -0500 Subject: [PATCH] fix -Wsign-compare in BIT_STRING_jer --- skeletons/BIT_STRING_jer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/skeletons/BIT_STRING_jer.c b/skeletons/BIT_STRING_jer.c index f59d3c683..dc0624a54 100644 --- a/skeletons/BIT_STRING_jer.c +++ b/skeletons/BIT_STRING_jer.c @@ -108,7 +108,7 @@ BIT_STRING_encode_jer(const asn_TYPE_descriptor_t *td, } int wr = snprintf(scratch, sizeof(scratch), "%lu", st->size * 8 - (st->bits_unused)); - if(wr < 0 || wr >= sizeof(scratch)) { + if(wr < 0 || (size_t)wr >= sizeof(scratch)) { ASN__ENCODE_FAILED; } ASN__CALLBACK(scratch, wr); @@ -283,7 +283,7 @@ BIT_STRING_decode_jer(const asn_codec_ctx_t *opt_codec_ctx, SKIPCHAR('}'); } else { - if(st->size * 8 < cts->size) { + if(st->size * 8 < (size_t)cts->size) { RETURN(RC_FAIL); } st->bits_unused = (st->size * 8) - cts->size;