Commit 490da82c authored by Vasil Velichkov's avatar Vasil Velichkov

Fix sign-compare error

../skeletons/INTEGER.c:510:60: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
             if(specs && specs->field_unsigned && dec_value <= ULONG_MAX) {
parent 34e8fc5f
...@@ -507,7 +507,7 @@ INTEGER__xer_body_decode(const asn_TYPE_descriptor_t *td, void *sptr, ...@@ -507,7 +507,7 @@ INTEGER__xer_body_decode(const asn_TYPE_descriptor_t *td, void *sptr,
/* The last symbol encountered was a digit. */ /* The last symbol encountered was a digit. */
switch(asn_strtoimax_lim(dec_value_start, &dec_value_end, &dec_value)) { switch(asn_strtoimax_lim(dec_value_start, &dec_value_end, &dec_value)) {
case ASN_STRTOX_OK: case ASN_STRTOX_OK:
if(specs && specs->field_unsigned && dec_value <= ULONG_MAX) { if(specs && specs->field_unsigned && (uintmax_t) dec_value <= ULONG_MAX) {
break; break;
} else if(dec_value >= LONG_MIN && dec_value <= LONG_MAX) { } else if(dec_value >= LONG_MIN && dec_value <= LONG_MAX) {
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment