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
cf3f6ebb
Commit
cf3f6ebb
authored
Aug 23, 2017
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
constness fix
parent
792641ee
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
9 deletions
+11
-9
libasn1compiler/asn1c_C.c
libasn1compiler/asn1c_C.c
+4
-4
libasn1compiler/asn1c_constraint.c
libasn1compiler/asn1c_constraint.c
+2
-2
libasn1compiler/asn1c_misc.c
libasn1compiler/asn1c_misc.c
+2
-2
libasn1compiler/asn1c_misc.h
libasn1compiler/asn1c_misc.h
+3
-1
No files found.
libasn1compiler/asn1c_C.c
View file @
cf3f6ebb
...
...
@@ -1375,7 +1375,7 @@ asn1c_lang_C_type_SIMPLE_TYPE(arg_t *arg) {
&&
etd_spec
==
ETD_NO_SPECIFICS
&&
0
/* This shortcut is incompatible with XER */
)
{
char
*
type_name
;
c
onst
c
har
*
type_name
;
REDIR
(
OT_FUNC_DECLS
);
type_name
=
asn1c_type_name
(
arg
,
expr
,
TNF_SAFE
);
OUT
(
"/* This type is equivalent to %s */
\n
"
,
type_name
);
...
...
@@ -2911,7 +2911,7 @@ emit_member_table(arg_t *arg, asn1p_expr_t *expr, asn1c_ioc_table_and_objset_t *
struct
asn1p_type_tag_s
outmost_tag_s
;
struct
asn1p_type_tag_s
*
outmost_tag
;
int
complex_contents
;
char
*
p
;
c
onst
c
har
*
p
;
if
(
WITH_MODULE_NAMESPACE
(
expr
->
module
,
expr_ns
,
...
...
@@ -3017,7 +3017,7 @@ emit_member_table(arg_t *arg, asn1p_expr_t *expr, asn1c_ioc_table_and_objset_t *
if
(
arg
->
flags
&
A1C_NO_CONSTRAINTS
)
{
OUT
(
"0,
\t
/* No check because of -fno-constraints */
\n
"
);
}
else
{
char
*
id
=
MKID
(
expr
);
c
onst
c
har
*
id
=
MKID
(
expr
);
if
(
expr
->
_anonymous_type
&&
!
strcmp
(
expr
->
Identifier
,
"Member"
))
id
=
asn1c_type_name
(
arg
,
expr
,
TNF_SAFE
);
...
...
@@ -3108,7 +3108,7 @@ static int
emit_type_DEF
(
arg_t
*
arg
,
asn1p_expr_t
*
expr
,
enum
tvm_compat
tv_mode
,
int
tags_count
,
int
all_tags_count
,
int
elements_count
,
enum
etd_spec
spec
)
{
asn1p_expr_t
*
terminal
;
int
using_type_name
=
0
;
char
*
p
=
MKID
(
expr
);
c
onst
c
har
*
p
=
MKID
(
expr
);
char
*
p2
=
(
char
*
)
0
;
terminal
=
asn1f_find_terminal_type_ex
(
arg
->
asn
,
arg
->
ns
,
expr
);
...
...
libasn1compiler/asn1c_constraint.c
View file @
cf3f6ebb
...
...
@@ -92,7 +92,7 @@ asn1c_emit_constraint_checking_code(arg_t *arg) {
break
;
}
if
(
produce_st
)
{
char
*
tname
=
asn1c_type_name
(
arg
,
arg
->
expr
,
TNF_SAFE
);
c
onst
c
har
*
tname
=
asn1c_type_name
(
arg
,
arg
->
expr
,
TNF_SAFE
);
OUT
(
"const %s_t *st = (const %s_t *)sptr;
\n
"
,
tname
,
tname
);
}
...
...
@@ -427,7 +427,7 @@ static int
emit_alphabet_check_loop
(
arg_t
*
arg
,
asn1cnst_range_t
*
range
)
{
asn1c_integer_t
natural_stop
;
asn1p_expr_t
*
terminal
;
char
*
tname
;
c
onst
c
har
*
tname
;
terminal
=
asn1f_find_terminal_type_ex
(
arg
->
asn
,
arg
->
ns
,
arg
->
expr
);
if
(
terminal
)
{
...
...
libasn1compiler/asn1c_misc.c
View file @
cf3f6ebb
...
...
@@ -168,13 +168,13 @@ asn1c_make_identifier(enum ami_flags_e flags, asn1p_expr_t *expr, ...) {
return
storage
;
}
char
*
c
onst
c
har
*
asn1c_type_name
(
arg_t
*
arg
,
asn1p_expr_t
*
expr
,
enum
tnfmt
_format
)
{
asn1p_expr_t
*
exprid
=
0
;
asn1p_expr_t
*
top_parent
;
asn1p_expr_t
*
terminal
=
0
;
int
stdname
=
0
;
char
*
typename
;
c
onst
c
har
*
typename
;
/* Rewind to the topmost parent expression */
if
((
top_parent
=
expr
->
parent_expr
))
...
...
libasn1compiler/asn1c_misc.h
View file @
cf3f6ebb
...
...
@@ -16,6 +16,8 @@ char *asn1c_make_identifier(enum ami_flags_e, asn1p_expr_t *expr, ...);
/*
* Return the type name of the specified expression.
* The returned string is a pointer to a statically allocated buffer which is
* going to be clobbered by the subsequent invocation of this function.
*/
enum
tnfmt
{
TNF_UNMODIFIED
=
0x10
,
/* Return unmodified type name */
...
...
@@ -24,7 +26,7 @@ enum tnfmt {
TNF_SAFE
=
0x40
,
/* Replace unsafe characters with _ */
TNF_RSAFE
=
0x50
,
/* Recursion-safe C type format */
};
char
*
asn1c_type_name
(
arg_t
*
arg
,
asn1p_expr_t
*
expr
,
enum
tnfmt
_format
);
c
onst
c
har
*
asn1c_type_name
(
arg_t
*
arg
,
asn1p_expr_t
*
expr
,
enum
tnfmt
_format
);
/*
* Check whether the specified INTEGER or ENUMERATED type can be represented
...
...
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