From 71cb3d49a888ed14ce1fa53123b587705e053f9d Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Tue, 19 Jul 2022 14:02:23 +0200 Subject: [PATCH] fix 3 indents to avoid build failure with -Werror The build failures complain about misleading indentation: ../../../src/libasn1c/src/per_decoder.c:161:9: error: this 'if' clause does not guard... [-Werror=misleading-indentation] 161 | if(!td->aper_decoder) | ^~ ../../../src/libasn1c/src/per_decoder.c:163:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if' 163 | rval = td->aper_decoder(opt_codec_ctx, td, 0, sptr, &pd); | ^~~~ Change-Id: I9ebd0de9135722bb718e2a5067f9b8238d0483dc --- src/INTEGER.c | 4 ++-- src/constr_CHOICE.c | 4 ++-- src/per_decoder.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/INTEGER.c b/src/INTEGER.c index b3f0da1..042fd75 100644 --- a/src/INTEGER.c +++ b/src/INTEGER.c @@ -775,8 +775,8 @@ INTEGER_decode_aper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, ? asn_ulong2INTEGER(st, value) : asn_long2INTEGER(st, value)) _ASN_DECODE_FAILED; - ASN_DEBUG("Got value %ld + low %lld", - value, ct->lower_bound); + ASN_DEBUG("Got value %ld + low %lld", + value, ct->lower_bound); } return rval; } else { diff --git a/src/constr_CHOICE.c b/src/constr_CHOICE.c index 18c24cd..df68feb 100644 --- a/src/constr_CHOICE.c +++ b/src/constr_CHOICE.c @@ -1134,8 +1134,8 @@ CHOICE_encode_aper(asn_TYPE_descriptor_t *td, if(per_put_few_bits(po, present, ct->range_bits)) _ASN_ENCODE_FAILED; - return elm->type->aper_encoder(elm->type, elm->per_constraints, - memb_ptr, po); + return elm->type->aper_encoder(elm->type, elm->per_constraints, + memb_ptr, po); } else { asn_enc_rval_t rval; if(specs->ext_start == -1) diff --git a/src/per_decoder.c b/src/per_decoder.c index 20fe1a1..b5056b5 100644 --- a/src/per_decoder.c +++ b/src/per_decoder.c @@ -160,7 +160,7 @@ aper_decode(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, void **sp */ if(!td->aper_decoder) _ASN_DECODE_FAILED; /* PER is not compiled in */ - rval = td->aper_decoder(opt_codec_ctx, td, 0, sptr, &pd); + rval = td->aper_decoder(opt_codec_ctx, td, 0, sptr, &pd); if(rval.code == RC_OK) { /* Return the number of consumed bits */ rval.consumed = ((pd.buffer - (const uint8_t *)buffer) << 3)