do not warn about not using a type-identifier that indicates
an enumeration type and is imported, because its enumeration literals might be used
This commit is contained in:
parent
3ea6d40b4c
commit
04f0550f1d
|
@ -240,8 +240,9 @@ DoImport(df, scope, kind)
|
||||||
/* Definition "df" is imported to scope "scope".
|
/* Definition "df" is imported to scope "scope".
|
||||||
Handle the case that it is an enumeration type or a module.
|
Handle the case that it is an enumeration type or a module.
|
||||||
*/
|
*/
|
||||||
|
register t_def *idef = define(df->df_idf, scope, kind);
|
||||||
|
|
||||||
define(df->df_idf, scope, kind)->imp_def = df;
|
idef->imp_def = df;
|
||||||
|
|
||||||
while (df->df_kind & D_IMPORTED) {
|
while (df->df_kind & D_IMPORTED) {
|
||||||
df = df->imp_def;
|
df = df->imp_def;
|
||||||
|
@ -258,6 +259,7 @@ DoImport(df, scope, kind)
|
||||||
are not used
|
are not used
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
idef->df_flags |= D_USED; /* don't complain ... */
|
||||||
}
|
}
|
||||||
else if (df->df_kind == D_MODULE) {
|
else if (df->df_kind == D_MODULE) {
|
||||||
/* Also import all definitions that are exported from this
|
/* Also import all definitions that are exported from this
|
||||||
|
@ -280,6 +282,7 @@ DoImport(df, scope, kind)
|
||||||
/* don't complain when these are not used */
|
/* don't complain when these are not used */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
idef->df_flags |= D_USED; /* don't complain ... */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue