Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
asn1c
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
asn1c
Commits
77cdf2bd
Commit
77cdf2bd
authored
Jun 02, 2021
by
Uri Blumenthal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address compiler warnings and compaints from Sanitizers (revealed
by Clang-12 from Xcode-12.5 on macOS Big Sur 11.4)
parent
73d2e980
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
38 additions
and
27 deletions
+38
-27
skeletons/OCTET_STRING_print.c
skeletons/OCTET_STRING_print.c
+1
-1
skeletons/OCTET_STRING_xer.c
skeletons/OCTET_STRING_xer.c
+1
-1
skeletons/UTF8String.c
skeletons/UTF8String.c
+4
-4
skeletons/asn_codecs_prim_xer.c
skeletons/asn_codecs_prim_xer.c
+1
-1
skeletons/uper_opentype.c
skeletons/uper_opentype.c
+1
-1
skeletons/xer_decoder.c
skeletons/xer_decoder.c
+1
-1
tests/tests-asn1c-compiler/check-parsing.sh
tests/tests-asn1c-compiler/check-parsing.sh
+1
-0
tests/tests-c-compiler/data-126/data-126-01.in
tests/tests-c-compiler/data-126/data-126-01.in
+1
-1
tests/tests-c-compiler/data-126/data-126-02-P.in
tests/tests-c-compiler/data-126/data-126-02-P.in
+1
-1
tests/tests-c-compiler/data-126/data-126-14.in
tests/tests-c-compiler/data-126/data-126-14.in
+4
-2
tests/tests-c-compiler/data-126/data-126-15.in
tests/tests-c-compiler/data-126/data-126-15.in
+4
-2
tests/tests-c-compiler/data-126/data-126-16.in
tests/tests-c-compiler/data-126/data-126-16.in
+4
-2
tests/tests-c-compiler/data-126/data-126-20.in
tests/tests-c-compiler/data-126/data-126-20.in
+7
-5
tests/tests-c-compiler/data-126/data-126-21.in
tests/tests-c-compiler/data-126/data-126-21.in
+7
-5
No files found.
skeletons/OCTET_STRING_print.c
View file @
77cdf2bd
...
...
@@ -26,7 +26,7 @@ OCTET_STRING_print(const asn_TYPE_descriptor_t *td, const void *sptr,
* Dump the contents of the buffer in hexadecimal.
*/
buf
=
st
->
buf
;
end
=
buf
+
st
->
size
;
end
=
(
buf
==
NULL
)
?
NULL
:
buf
+
st
->
size
;
for
(
i
=
0
;
buf
<
end
;
buf
++
,
i
++
)
{
if
(
!
(
i
%
16
)
&&
(
i
||
st
->
size
>
16
))
{
if
(
cb
(
scratch
,
p
-
scratch
,
app_key
)
<
0
)
...
...
skeletons/OCTET_STRING_xer.c
View file @
77cdf2bd
...
...
@@ -286,7 +286,7 @@ static ssize_t OCTET_STRING__convert_hexadecimal(void *sptr, const void *chunk_b
static
ssize_t
OCTET_STRING__convert_binary
(
void
*
sptr
,
const
void
*
chunk_buf
,
size_t
chunk_size
,
int
have_more
)
{
BIT_STRING_t
*
st
=
(
BIT_STRING_t
*
)
sptr
;
const
char
*
p
=
(
const
char
*
)
chunk_buf
;
const
char
*
pend
=
p
+
chunk_size
;
const
char
*
pend
=
(
p
==
NULL
)
?
NULL
:
p
+
chunk_size
;
int
bits_unused
=
st
->
bits_unused
&
0x7
;
uint8_t
*
buf
;
...
...
skeletons/UTF8String.c
View file @
77cdf2bd
...
...
@@ -151,10 +151,10 @@ UTF8String_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
static
ssize_t
UTF8String__process
(
const
UTF8String_t
*
st
,
uint32_t
*
dst
,
size_t
dstlen
)
{
size_t
length
;
uint8_t
*
buf
=
st
->
buf
;
uint8_t
*
end
=
buf
+
st
->
size
;
uint32_t
*
dstend
=
dst
+
dstlen
;
size_t
length
=
0
;
uint8_t
*
buf
=
(
st
==
NULL
)
?
NULL
:
st
->
buf
;
uint8_t
*
end
=
(
buf
==
NULL
)
?
NULL
:
buf
+
st
->
size
;
uint32_t
*
dstend
=
(
dst
==
NULL
)
?
NULL
:
dst
+
dstlen
;
for
(
length
=
0
;
buf
<
end
;
length
++
)
{
int
ch
=
*
buf
;
...
...
skeletons/asn_codecs_prim_xer.c
View file @
77cdf2bd
...
...
@@ -92,7 +92,7 @@ xer_decode__primitive_body(void *key, const void *chunk_buf, size_t chunk_size,
}
lead_wsp_size
=
xer_whitespace_span
(
chunk_buf
,
chunk_size
);
chunk_buf
=
(
const
char
*
)
chunk_buf
+
lead_wsp_size
;
chunk_buf
+=
lead_wsp_size
;
chunk_size
-=
lead_wsp_size
;
bret
=
arg
->
prim_body_decoder
(
arg
->
type_descriptor
,
...
...
skeletons/uper_opentype.c
View file @
77cdf2bd
...
...
@@ -94,7 +94,7 @@ uper_open_type_get_simple(const asn_codec_ctx_t *ctx,
}
buf
=
ptr
;
}
if
(
per_get_many_bits
(
pd
,
buf
+
bufLen
,
0
,
chunk_bytes
<<
3
))
{
if
(
per_get_many_bits
(
pd
,
(
buf
==
NULL
)
?
NULL
:
buf
+
bufLen
,
0
,
chunk_bytes
<<
3
))
{
FREEMEM
(
buf
);
ASN__DECODE_STARVED
;
}
...
...
skeletons/xer_decoder.c
View file @
77cdf2bd
...
...
@@ -323,7 +323,7 @@ xer_decode_general(const asn_codec_ctx_t *opt_codec_ctx,
size_t
xer_whitespace_span
(
const
void
*
chunk_buf
,
size_t
chunk_size
)
{
const
char
*
p
=
(
const
char
*
)
chunk_buf
;
const
char
*
pend
=
p
+
chunk_size
;
const
char
*
pend
=
(
p
==
NULL
)
?
NULL
:
p
+
chunk_size
;
for
(;
p
<
pend
;
p
++
)
{
switch
(
*
p
)
{
...
...
tests/tests-asn1c-compiler/check-parsing.sh
View file @
77cdf2bd
...
...
@@ -3,6 +3,7 @@
# Test diff(1) capabilities
diff
-a
.
.
2>/dev/null
&&
diffArgs
=
"-a"
# Assume text files
diff
-u
.
.
2>/dev/null
&&
diffArgs
=
"
$diffArgs
-u"
# Unified diff output
diff
-w
.
.
2>/dev/null
&&
diffArgs
=
"
$diffArgs
-w"
# Number of whitespaces not relevant
finalExitCode
=
0
...
...
tests/tests-c-compiler/data-126/data-126-01.in
View file @
77cdf2bd
<PDU>
<str-m></str-m>
<str-m></str-m>
</PDU>
tests/tests-c-compiler/data-126/data-126-02-P.in
View file @
77cdf2bd
<PDU>
<str-m></str-m>
<str-m></str-m>
</PDU>
tests/tests-c-compiler/data-126/data-126-14.in
View file @
77cdf2bd
<PDU>
<str-m>ab</str-m>
<singl><opt-z></opt-z></singl>
<str-m>ab</str-m>
<singl>
<opt-z></opt-z>
</singl>
</PDU>
tests/tests-c-compiler/data-126/data-126-15.in
View file @
77cdf2bd
<PDU>
<str-m></str-m>
<singl><opt-z>z</opt-z></singl>
<str-m></str-m>
<singl>
<opt-z>z</opt-z>
</singl>
</PDU>
tests/tests-c-compiler/data-126/data-126-16.in
View file @
77cdf2bd
<PDU>
<str-m>a</str-m>
<singl><opt-z>z</opt-z></singl>
<str-m>a</str-m>
<singl>
<opt-z>z</opt-z>
</singl>
</PDU>
tests/tests-c-compiler/data-126/data-126-20.in
View file @
77cdf2bd
<PDU>
<str-m>some long string spanning multiple bytes</str-m>
<singl><opt-z>zzz-zzz-zzz-zzz</opt-z></singl>
<pdu-2>
<ext0>13</ext0>
</pdu-2>
<str-m>some long string spanning multiple bytes</str-m>
<singl>
<opt-z>zzz-zzz-zzz-zzz</opt-z>
</singl>
<pdu-2>
<ext0>13</ext0>
</pdu-2>
</PDU>
tests/tests-c-compiler/data-126/data-126-21.in
View file @
77cdf2bd
<PDU>
<str-m></str-m>
<singl><opt-z></opt-z></singl>
<pdu-2>
<ext0>0</ext0>
</pdu-2>
<str-m></str-m>
<singl>
<opt-z></opt-z>
</singl>
<pdu-2>
<ext0>0</ext0>
</pdu-2>
</PDU>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment