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
1a7cbd73
Commit
1a7cbd73
authored
Mar 07, 2006
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ignore clashes with standard modules
parent
6b3ff543
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
17 deletions
+32
-17
libasn1fix/asn1fix.c
libasn1fix/asn1fix.c
+32
-17
No files found.
libasn1fix/asn1fix.c
View file @
1a7cbd73
...
@@ -439,30 +439,45 @@ asn1f_check_duplicate(arg_t *arg) {
...
@@ -439,30 +439,45 @@ asn1f_check_duplicate(arg_t *arg) {
* The linear scan is just fine for the task, no need to over-optimize.
* The linear scan is just fine for the task, no need to over-optimize.
*/
*/
TQ_FOR
(
tmparg
.
mod
,
&
arg
->
asn
->
modules
,
mod_next
)
{
TQ_FOR
(
tmparg
.
mod
,
&
arg
->
asn
->
modules
,
mod_next
)
{
int
critical
=
1
;
/* FATAL */
if
((
arg
->
mod
->
_tags
&
MT_STANDARD_MODULE
)
!=
(
tmparg
.
mod
->
_tags
&
MT_STANDARD_MODULE
))
{
/* Ignore clashes with standard module */
critical
=
0
;
/* WARNING */
}
TQ_FOR
(
tmparg
.
expr
,
&
(
tmparg
.
mod
->
members
),
next
)
{
TQ_FOR
(
tmparg
.
expr
,
&
(
tmparg
.
mod
->
members
),
next
)
{
int
diff_files
;
/* different files */
assert
(
tmparg
.
expr
->
Identifier
);
assert
(
tmparg
.
expr
->
Identifier
);
assert
(
arg
->
expr
->
Identifier
);
assert
(
arg
->
expr
->
Identifier
);
if
(
tmparg
.
expr
==
arg
->
expr
)
break
;
if
(
tmparg
.
expr
==
arg
->
expr
)
break
;
if
(
strcmp
(
tmparg
.
expr
->
Identifier
,
if
(
strcmp
(
tmparg
.
expr
->
Identifier
,
arg
->
expr
->
Identifier
)
==
0
)
{
arg
->
expr
->
Identifier
))
int
diff_files
=
strcmp
(
arg
->
mod
->
source_file_name
,
tmparg
.
mod
->
source_file_name
)
?
1
:
0
;
continue
;
FATAL
(
"ASN.1 expression
\"
%s
\"
at line %d of module %s
\n
"
"clashes with expression
\"
%s
\"
at line %d of module %s"
diff_files
=
strcmp
(
arg
->
mod
->
source_file_name
,
"%s%s%s.
\n
"
tmparg
.
mod
->
source_file_name
)
?
1
:
0
;
"Please rename either instance to resolve the conflict"
,
arg
->
expr
->
Identifier
,
LOG
(
critical
,
arg
->
expr
->
_lineno
,
"ASN.1 expression
\"
%s
\"
at line %d of module %s
\n
"
arg
->
mod
->
ModuleName
,
"clashes with expression
\"
%s
\"
at line %d of module %s"
tmparg
.
expr
->
Identifier
,
"%s%s%s.
\n
"
tmparg
.
expr
->
_lineno
,
"Please rename either instance to resolve the conflict"
,
tmparg
.
mod
->
ModuleName
,
arg
->
expr
->
Identifier
,
diff_files
?
" ("
:
""
,
arg
->
expr
->
_lineno
,
diff_files
?
tmparg
.
mod
->
source_file_name
:
""
,
arg
->
mod
->
ModuleName
,
diff_files
?
")"
:
""
tmparg
.
expr
->
Identifier
,
);
tmparg
.
expr
->
_lineno
,
tmparg
.
mod
->
ModuleName
,
diff_files
?
" ("
:
""
,
diff_files
?
tmparg
.
mod
->
source_file_name
:
""
,
diff_files
?
")"
:
""
);
if
(
critical
)
return
-
1
;
return
-
1
;
}
}
}
if
(
tmparg
.
mod
==
arg
->
mod
)
break
;
if
(
tmparg
.
mod
==
arg
->
mod
)
break
;
}
}
...
...
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