aboutsummaryrefslogtreecommitdiffstats
path: root/libasn1fix/asn1fix.c
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2006-03-07 10:39:42 +0000
committerLev Walkin <vlm@lionet.info>2006-03-07 10:39:42 +0000
commit1a7cbd737c4b80faba8fd079444976093e2ed3d9 (patch)
tree9a9c339717ece146a57d6932e44e323723bd2c28 /libasn1fix/asn1fix.c
parent6b3ff543138c5e8ba660573ebb473b06f86e3a2c (diff)
ignore clashes with standard modules
Diffstat (limited to 'libasn1fix/asn1fix.c')
-rw-r--r--libasn1fix/asn1fix.c49
1 files changed, 32 insertions, 17 deletions
diff --git a/libasn1fix/asn1fix.c b/libasn1fix/asn1fix.c
index aa7a2334..5ee73a87 100644
--- a/libasn1fix/asn1fix.c
+++ b/libasn1fix/asn1fix.c
@@ -439,30 +439,45 @@ asn1f_check_duplicate(arg_t *arg) {
* The linear scan is just fine for the task, no need to over-optimize.
*/
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) {
+ int diff_files; /* different files */
+
assert(tmparg.expr->Identifier);
assert(arg->expr->Identifier);
+
if(tmparg.expr == arg->expr) break;
if(strcmp(tmparg.expr->Identifier,
- arg->expr->Identifier) == 0) {
- int diff_files = strcmp(arg->mod->source_file_name, tmparg.mod->source_file_name) ? 1 : 0;
- FATAL("ASN.1 expression \"%s\" at line %d of module %s\n"
- "clashes with expression \"%s\" at line %d of module %s"
- "%s%s%s.\n"
- "Please rename either instance to resolve the conflict",
- arg->expr->Identifier,
- arg->expr->_lineno,
- arg->mod->ModuleName,
- tmparg.expr->Identifier,
- tmparg.expr->_lineno,
- tmparg.mod->ModuleName,
- diff_files ? " (" : "",
- diff_files ? tmparg.mod->source_file_name : "",
- diff_files ? ")" : ""
- );
+ arg->expr->Identifier))
+ continue;
+
+ diff_files = strcmp(arg->mod->source_file_name,
+ tmparg.mod->source_file_name) ? 1 : 0;
+
+ LOG(critical,
+ "ASN.1 expression \"%s\" at line %d of module %s\n"
+ "clashes with expression \"%s\" at line %d of module %s"
+ "%s%s%s.\n"
+ "Please rename either instance to resolve the conflict",
+ arg->expr->Identifier,
+ arg->expr->_lineno,
+ arg->mod->ModuleName,
+ tmparg.expr->Identifier,
+ tmparg.expr->_lineno,
+ tmparg.mod->ModuleName,
+ diff_files ? " (" : "",
+ diff_files ? tmparg.mod->source_file_name : "",
+ diff_files ? ")" : "");
+ if(critical)
return -1;
- }
}
if(tmparg.mod == arg->mod) break;
}