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
b1f4f33a
Commit
b1f4f33a
authored
Oct 19, 2017
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove gcc-7 compiler warnings
parent
0afbd325
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
9 deletions
+18
-9
tests/tests-c-compiler/check-src/check-03.-fwide-types.c
tests/tests-c-compiler/check-src/check-03.-fwide-types.c
+0
-3
tests/tests-c-compiler/check-src/check-119.-fwide-types.-gen-PER.c
...ts-c-compiler/check-src/check-119.-fwide-types.-gen-PER.c
+6
-2
tests/tests-c-compiler/check-src/check-119.-gen-PER.c
tests/tests-c-compiler/check-src/check-119.-gen-PER.c
+6
-2
tests/tests-c-compiler/check-src/check-126.-gen-PER.c
tests/tests-c-compiler/check-src/check-126.-gen-PER.c
+6
-2
No files found.
tests/tests-c-compiler/check-src/check-03.-fwide-types.c
View file @
b1f4f33a
...
...
@@ -13,12 +13,9 @@ static int buf_offset;
static
int
buf_writer
(
const
void
*
buffer
,
size_t
size
,
void
*
app_key
)
{
char
*
b
,
*
bend
;
(
void
)
app_key
;
assert
(
buf_offset
+
size
<
sizeof
(
buf
));
memcpy
(
buf
+
buf_offset
,
buffer
,
size
);
b
=
buf
+
buf_offset
;
bend
=
b
+
size
;
buf_offset
+=
size
;
return
0
;
}
...
...
tests/tests-c-compiler/check-src/check-119.-fwide-types.-gen-PER.c
View file @
b1f4f33a
...
...
@@ -39,13 +39,13 @@ static size_t buf_offset;
static
int
_buf_writer
(
const
void
*
buffer
,
size_t
size
,
void
*
app_key
)
{
unsigned
char
*
b
,
*
bend
;
(
void
)
app_key
;
assert
(
buf_offset
+
size
<
sizeof
(
buf
));
memcpy
(
buf
+
buf_offset
,
buffer
,
size
);
#ifdef EMIT_ASN_DEBUG
unsigned
char
*
b
,
*
bend
;
b
=
buf
+
buf_offset
;
bend
=
b
+
size
;
#ifdef EMIT_ASN_DEBUG
fprintf
(
stderr
,
"=> ["
);
for
(;
b
<
bend
;
b
++
)
{
if
(
*
b
>=
32
&&
*
b
<
127
&&
*
b
!=
'%'
)
...
...
@@ -97,6 +97,8 @@ save_object_as(PDU_t *st, enum expectation exp, enum enctype how) {
rval
=
xer_encode
(
&
asn_DEF_PDU
,
st
,
XER_F_CANONICAL
,
_buf_writer
,
0
);
break
;
default:
assert
(
!
"Unreachable"
);
}
if
(
rval
.
encoded
==
-
1
)
{
...
...
@@ -173,6 +175,8 @@ load_object_from(const char *fname, enum expectation expectation, unsigned char
case
AS_DER
:
case
AS_CXER
:
assert
(
!
"DER or CXER not supported for load"
);
default:
assert
(
!
"Unreachable"
);
}
fbuf_offset
+=
rval
.
consumed
;
fbuf_left
-=
rval
.
consumed
;
...
...
tests/tests-c-compiler/check-src/check-119.-gen-PER.c
View file @
b1f4f33a
...
...
@@ -39,13 +39,13 @@ static size_t buf_offset;
static
int
_buf_writer
(
const
void
*
buffer
,
size_t
size
,
void
*
app_key
)
{
unsigned
char
*
b
,
*
bend
;
(
void
)
app_key
;
assert
(
buf_offset
+
size
<
sizeof
(
buf
));
memcpy
(
buf
+
buf_offset
,
buffer
,
size
);
#ifdef EMIT_ASN_DEBUG
unsigned
char
*
b
,
*
bend
;
b
=
buf
+
buf_offset
;
bend
=
b
+
size
;
#ifdef EMIT_ASN_DEBUG
fprintf
(
stderr
,
"=> ["
);
for
(;
b
<
bend
;
b
++
)
{
if
(
*
b
>=
32
&&
*
b
<
127
&&
*
b
!=
'%'
)
...
...
@@ -97,6 +97,8 @@ save_object_as(PDU_t *st, enum expectation exp, enum enctype how) {
rval
=
xer_encode
(
&
asn_DEF_PDU
,
st
,
XER_F_CANONICAL
,
_buf_writer
,
0
);
break
;
default:
assert
(
!
"Unreachable"
);
}
if
(
rval
.
encoded
==
-
1
)
{
...
...
@@ -173,6 +175,8 @@ load_object_from(const char *fname, enum expectation expectation, unsigned char
case
AS_DER
:
case
AS_CXER
:
assert
(
!
"Unexpected DER or CXER load request"
);
default:
assert
(
!
"Unreachable"
);
}
fbuf_offset
+=
rval
.
consumed
;
fbuf_left
-=
rval
.
consumed
;
...
...
tests/tests-c-compiler/check-src/check-126.-gen-PER.c
View file @
b1f4f33a
...
...
@@ -29,13 +29,13 @@ static int buf_offset;
static
int
_buf_writer
(
const
void
*
buffer
,
size_t
size
,
void
*
app_key
)
{
unsigned
char
*
b
,
*
bend
;
(
void
)
app_key
;
assert
(
buf_offset
+
size
<
sizeof
(
buf
));
memcpy
(
buf
+
buf_offset
,
buffer
,
size
);
#ifdef EMIT_ASN_DEBUG
unsigned
char
*
b
,
*
bend
;
b
=
buf
+
buf_offset
;
bend
=
b
+
size
;
#ifdef EMIT_ASN_DEBUG
fprintf
(
stderr
,
"=> ["
);
for
(;
b
<
bend
;
b
++
)
{
if
(
*
b
>=
32
&&
*
b
<
127
&&
*
b
!=
'%'
)
...
...
@@ -78,6 +78,8 @@ save_object_as(PDU_t *st, enum enctype how) {
rval
=
xer_encode
(
&
asn_DEF_PDU
,
st
,
XER_F_BASIC
,
_buf_writer
,
0
);
break
;
default:
assert
(
!
"Unreachable"
);
}
if
(
rval
.
encoded
==
-
1
)
{
...
...
@@ -177,6 +179,8 @@ load_object_from(const char *fname, unsigned char *fbuf, size_t size, enum encty
}
}
break
;
default:
assert
(
!
"Unreachable"
);
}
fbuf_offset
+=
rval
.
consumed
;
fbuf_left
-=
rval
.
consumed
;
...
...
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