osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/asn1c/+/33761 )
Change subject: skeletons: fix various typos
......................................................................
Patch Set 1:
(2 comments)
File skeletons/INTEGER.h:
https://gerrit.osmocom.org/c/asn1c/+/33761/comment/61fc3b63_2215c37c
PS1, Line 71: ASN_STRTOL_OK = 0, /* Conversion succeeded, number ends at (*end) */
> please, no spaces at the start of a line
doesn't make sense to change formatting here
https://gerrit.osmocom.org/c/asn1c/+/33761/comment/97ec66aa_45a0dbcf
PS1, Line 72: ASN_STRTOL_EXTRA_DATA = 1, /* Conversion succeeded, but the string has extra stuff */
> please, no spaces at the start of a line
doesn't make sense to change formatting here
--
To view, visit https://gerrit.osmocom.org/c/asn1c/+/33761
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: asn1c
Gerrit-Branch: osmo-iuh/master
Gerrit-Change-Id: I9e2fa5a2e0c2bf153f67c1ae363baa1abb44f7ad
Gerrit-Change-Number: 33761
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Mon, 17 Jul 2023 10:00:55 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/33764 )
Change subject: jobs/gerrit-verifications: disable lint for asn1c
......................................................................
jobs/gerrit-verifications: disable lint for asn1c
The asn1c code does not follow our coding guidelines, and in the
interest of keeping it closer to upstream it does not make sense to
reformat it.
Change-Id: Iae97d8997b576e43c9a73dfcc61a9260f875310f
---
M jobs/gerrit-verifications.yml
1 file changed, 14 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/64/33764/1
diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml
index c41d2a3..7b6c1f8 100644
--- a/jobs/gerrit-verifications.yml
+++ b/jobs/gerrit-verifications.yml
@@ -98,6 +98,7 @@
repos:
- asn1c:
pipeline_binpkgs: false
+ pipeline_lint: false
- cellmgr-ng
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/33764
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: Iae97d8997b576e43c9a73dfcc61a9260f875310f
Gerrit-Change-Number: 33764
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange
Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/asn1c/+/33761 )
Change subject: skeletons: fix various typos
......................................................................
Patch Set 1:
(2 comments)
File skeletons/INTEGER.h:
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-9688):
https://gerrit.osmocom.org/c/asn1c/+/33761/comment/b0508553_c7e3e328
PS1, Line 71: ASN_STRTOL_OK = 0, /* Conversion succeeded, number ends at (*end) */
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-9688):
https://gerrit.osmocom.org/c/asn1c/+/33761/comment/1c87ab23_fc7d9f3b
PS1, Line 72: ASN_STRTOL_EXTRA_DATA = 1, /* Conversion succeeded, but the string has extra stuff */
please, no spaces at the start of a line
--
To view, visit https://gerrit.osmocom.org/c/asn1c/+/33761
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: asn1c
Gerrit-Branch: osmo-iuh/master
Gerrit-Change-Id: I9e2fa5a2e0c2bf153f67c1ae363baa1abb44f7ad
Gerrit-Change-Number: 33761
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Mon, 17 Jul 2023 09:53:09 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: osmith.
Hello Jenkins Builder, laforge, fixeria, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-remsim/+/33733
to look at the new patch set (#2).
Change subject: src/rspro: regenerate to fix misleading indents
......................................................................
src/rspro: regenerate to fix misleading indents
After upgrading our CI environment to use Debian 12 with
GCC 12, it complains about the following misleading indentations.
Regenerate the rspro code with asn1c
I2260df8f8ab8eaf5c2aac3c330f87dba4691c01e to be able to compile with
--enable-werror again.
The asn_internal.h file is left unchanged to preserve changes from
I14fff863449971024002e0d5465fb7a964d67095.
Related: OS#6057
Change-Id: Icc2e8da7232a93b04ac8f23800380ca9317bd60f
---
M src/rspro/INTEGER.c
M src/rspro/ResetStateReq.c
M src/rspro/ResetStateRes.c
M src/rspro/constr_CHOICE.c
M src/rspro/per_decoder.c
5 files changed, 26 insertions(+), 7 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/33/33733/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/33733
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-remsim
Gerrit-Branch: master
Gerrit-Change-Id: Icc2e8da7232a93b04ac8f23800380ca9317bd60f
Gerrit-Change-Number: 33733
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newpatchset
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/asn1c/+/33762 )
Change subject: skeletons: fix misleading indentations
......................................................................
skeletons: fix misleading indentations
After upgrading our CI environment to use Debian 12 with
GCC 12, it complains about the following misleading indentations in
generated code in osmo-remsim.git. Fix it to be able to compile with
--enable-werror again.
../../../../src/osmo-remsim/src/rspro/INTEGER.c: In function ‘INTEGER_decode_aper’:
../../../../src/osmo-remsim/src/rspro/INTEGER.c:774:33: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
774 | if((specs && specs->field_unsigned)
| ^~
../../../../src/osmo-remsim/src/rspro/INTEGER.c:778:41: note: ...this statement, but the latter is misleadingly indented as if it were guarded by t
he ‘if’
778 | ASN_DEBUG("Got value %ld + low %lld",
| ^~~~~~~~~
cc1: all warnings being treated as errors
../../../../src/osmo-remsim/src/rspro/constr_CHOICE.c: In function ‘CHOICE_encode_aper’:
../../../../src/osmo-remsim/src/rspro/constr_CHOICE.c:1134:17: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
1134 | if(per_put_few_bits(po, present, ct->range_bits))
| ^~
../../../../src/osmo-remsim/src/rspro/constr_CHOICE.c:1137:25: note: ...this statement, but the latter is misleadingly indented as if it were guard
ed by the ‘if’
1137 | return elm->type->aper_encoder(elm->type, elm->per_constraints,
| ^~~~~~
cc1: all warnings being treated as errors
../../../../src/osmo-remsim/src/rspro/per_decoder.c: In function ‘aper_decode’:
../../../../src/osmo-remsim/src/rspro/per_decoder.c:161:9: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
161 | if(!td->aper_decoder)
| ^~
../../../../src/osmo-remsim/src/rspro/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);
| ^~~~
Related: OS#6057
Change-Id: I2260df8f8ab8eaf5c2aac3c330f87dba4691c01e
---
M skeletons/INTEGER.c
M skeletons/constr_CHOICE.c
M skeletons/per_decoder.c
3 files changed, 47 insertions(+), 5 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/asn1c refs/changes/62/33762/1
diff --git a/skeletons/INTEGER.c b/skeletons/INTEGER.c
index b3f0da1..042fd75 100644
--- a/skeletons/INTEGER.c
+++ b/skeletons/INTEGER.c
@@ -775,8 +775,8 @@
? 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/skeletons/constr_CHOICE.c b/skeletons/constr_CHOICE.c
index 6a88b29..4e95e1d 100644
--- a/skeletons/constr_CHOICE.c
+++ b/skeletons/constr_CHOICE.c
@@ -1134,8 +1134,8 @@
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/skeletons/per_decoder.c b/skeletons/per_decoder.c
index 20fe1a1..b5056b5 100644
--- a/skeletons/per_decoder.c
+++ b/skeletons/per_decoder.c
@@ -160,7 +160,7 @@
*/
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)
--
To view, visit https://gerrit.osmocom.org/c/asn1c/+/33762
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: asn1c
Gerrit-Branch: osmo-iuh/master
Gerrit-Change-Id: I2260df8f8ab8eaf5c2aac3c330f87dba4691c01e
Gerrit-Change-Number: 33762
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/asn1c/+/33761 )
Change subject: skeletons: fix various typos
......................................................................
skeletons: fix various typos
These typos have been fixed in the generated rspro code in
osmo-remsim.git. Fix them here as well, so when regenerating the code we
don't re-introduce the typos.
Change-Id: I9e2fa5a2e0c2bf153f67c1ae363baa1abb44f7ad
---
M skeletons/INTEGER.h
M skeletons/NativeInteger.c
M skeletons/OCTET_STRING.c
M skeletons/ber_tlv_tag.c
M skeletons/constr_CHOICE.c
M skeletons/constr_SEQUENCE.c
M skeletons/constr_SET.c
M skeletons/constr_SET_OF.c
M skeletons/constr_TYPE.h
M skeletons/converter-sample.c
M skeletons/per_opentype.c
M skeletons/per_support.h
12 files changed, 27 insertions(+), 14 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/asn1c refs/changes/61/33761/1
diff --git a/skeletons/INTEGER.h b/skeletons/INTEGER.h
index e8b36c7..c8edf12 100644
--- a/skeletons/INTEGER.h
+++ b/skeletons/INTEGER.h
@@ -68,8 +68,8 @@
ASN_STRTOL_ERROR_RANGE = -3, /* Input outside of numeric range for long type */
ASN_STRTOL_ERROR_INVAL = -2, /* Invalid data encountered (e.g., "+-") */
ASN_STRTOL_EXPECT_MORE = -1, /* More data expected (e.g. "+") */
- ASN_STRTOL_OK = 0, /* Conversion succeded, number ends at (*end) */
- ASN_STRTOL_EXTRA_DATA = 1, /* Conversion succeded, but the string has extra stuff */
+ ASN_STRTOL_OK = 0, /* Conversion succeeded, number ends at (*end) */
+ ASN_STRTOL_EXTRA_DATA = 1, /* Conversion succeeded, but the string has extra stuff */
};
enum asn_strtol_result_e asn_strtol_lim(const char *str, const char **end, long *l);
diff --git a/skeletons/NativeInteger.c b/skeletons/NativeInteger.c
index ef17bee..17a58ea 100644
--- a/skeletons/NativeInteger.c
+++ b/skeletons/NativeInteger.c
@@ -94,7 +94,7 @@
/*
* ASN.1 encoded INTEGER: buf_ptr, length
* Fill the native, at the same time checking for overflow.
- * If overflow occured, return with RC_FAIL.
+ * If overflow occurred, return with RC_FAIL.
*/
{
INTEGER_t tmp;
diff --git a/skeletons/OCTET_STRING.c b/skeletons/OCTET_STRING.c
index 3e424e7..6df9a0a 100644
--- a/skeletons/OCTET_STRING.c
+++ b/skeletons/OCTET_STRING.c
@@ -109,7 +109,7 @@
/*
* The main reason why ASN.1 is still alive is that too much time and effort
* is necessary for learning it more or less adequately, thus creating a gut
- * necessity to demonstrate that aquired skill everywhere afterwards.
+ * necessity to demonstrate that acquired skill everywhere afterwards.
* No, I am not going to explain what the following stuff is.
*/
struct _stack_el {
diff --git a/skeletons/ber_tlv_tag.c b/skeletons/ber_tlv_tag.c
index 4270876..adf3a25 100644
--- a/skeletons/ber_tlv_tag.c
+++ b/skeletons/ber_tlv_tag.c
@@ -42,7 +42,7 @@
*/
if(val >> ((8 * sizeof(val)) - 9)) {
/*
- * We would not be able to accomodate
+ * We would not be able to accommodate
* any more tag bits.
*/
return -1;
diff --git a/skeletons/constr_CHOICE.c b/skeletons/constr_CHOICE.c
index 18c24cd..6a88b29 100644
--- a/skeletons/constr_CHOICE.c
+++ b/skeletons/constr_CHOICE.c
@@ -156,7 +156,7 @@
}
if(ctx->left >= 0) {
- /* ?Substracted below! */
+ /* ?Subtracted below! */
ctx->left += rval.consumed;
}
ADVANCE(rval.consumed);
diff --git a/skeletons/constr_SEQUENCE.c b/skeletons/constr_SEQUENCE.c
index 21e5190..0ffa282 100644
--- a/skeletons/constr_SEQUENCE.c
+++ b/skeletons/constr_SEQUENCE.c
@@ -166,7 +166,7 @@
}
if(ctx->left >= 0)
- ctx->left += rval.consumed; /* ?Substracted below! */
+ ctx->left += rval.consumed; /* ?Subtracted below! */
ADVANCE(rval.consumed);
NEXT_PHASE(ctx);
diff --git a/skeletons/constr_SET.c b/skeletons/constr_SET.c
index 8a124c0..cc195dd 100644
--- a/skeletons/constr_SET.c
+++ b/skeletons/constr_SET.c
@@ -154,7 +154,7 @@
}
if(ctx->left >= 0)
- ctx->left += rval.consumed; /* ?Substracted below! */
+ ctx->left += rval.consumed; /* ?Subtracted below! */
ADVANCE(rval.consumed);
NEXT_PHASE(ctx);
diff --git a/skeletons/constr_SET_OF.c b/skeletons/constr_SET_OF.c
index 2fd530e..eb1d481 100644
--- a/skeletons/constr_SET_OF.c
+++ b/skeletons/constr_SET_OF.c
@@ -122,7 +122,7 @@
}
if(ctx->left >= 0)
- ctx->left += rval.consumed; /* ?Substracted below! */
+ ctx->left += rval.consumed; /* ?Subtracted below! */
ADVANCE(rval.consumed);
ASN_DEBUG("Structure consumes %ld bytes, "
diff --git a/skeletons/constr_TYPE.h b/skeletons/constr_TYPE.h
index 13c60f3..e244d20 100644
--- a/skeletons/constr_TYPE.h
+++ b/skeletons/constr_TYPE.h
@@ -158,8 +158,8 @@
typedef struct asn_TYPE_tag2member_s {
ber_tlv_tag_t el_tag; /* Outmost tag of the member */
int el_no; /* Index of the associated member, base 0 */
- int toff_first; /* First occurence of the el_tag, relative */
- int toff_last; /* Last occurence of the el_tag, relatvie */
+ int toff_first; /* First occurrence of the el_tag, relative */
+ int toff_last; /* Last occurrence of the el_tag, relatvie */
} asn_TYPE_tag2member_t;
/*
diff --git a/skeletons/converter-sample.c b/skeletons/converter-sample.c
index 2f74a80..6047273 100644
--- a/skeletons/converter-sample.c
+++ b/skeletons/converter-sample.c
@@ -390,7 +390,7 @@
/*
* Move the buffer content left N bits, possibly joining it with
- * preceeding content.
+ * preceding content.
*/
static void
buffer_shift_left(size_t offset, int bits) {
diff --git a/skeletons/per_opentype.c b/skeletons/per_opentype.c
index 8c42f8b..e697cbb 100644
--- a/skeletons/per_opentype.c
+++ b/skeletons/per_opentype.c
@@ -154,7 +154,7 @@
} else {
FREEMEM(buf);
/* rv.code could be RC_WMORE, nonsense in this context */
- rv.code = RC_FAIL; /* Noone would give us more */
+ rv.code = RC_FAIL; /* No one would give us more */
}
return rv;
diff --git a/skeletons/per_support.h b/skeletons/per_support.h
index 181fe24..ed945ce 100644
--- a/skeletons/per_support.h
+++ b/skeletons/per_support.h
@@ -53,7 +53,7 @@
*/
int32_t per_get_few_bits(asn_per_data_t *per_data, int get_nbits);
-/* Undo the immediately preceeding "get_few_bits" operation */
+/* Undo the immediately preceding "get_few_bits" operation */
void per_get_undo(asn_per_data_t *per_data, int get_nbits);
/*
--
To view, visit https://gerrit.osmocom.org/c/asn1c/+/33761
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: asn1c
Gerrit-Branch: osmo-iuh/master
Gerrit-Change-Id: I9e2fa5a2e0c2bf153f67c1ae363baa1abb44f7ad
Gerrit-Change-Number: 33761
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange