Some corrections and additions to improve the mechanism for

generating warnings on unused/uninitialized variables
This commit is contained in:
ceriel
1987-10-21 11:29:52 +00:00
parent b324cc9813
commit 8ddea7afe0
14 changed files with 92 additions and 63 deletions

View File

@@ -121,7 +121,7 @@ chk_forw(pdf)
*pdf = df->df_nextinscope;
RemoveFromIdList(df);
df = lookfor(nd, CurrVis, 1);
df = lookfor(nd, CurrVis, 1, 0);
if (! df->df_kind & (D_ERROR|D_FTYPE|D_TYPE)) {
node_error(nd, "\"%s\" is not a type", df1->df_idf->id_text);
}
@@ -217,9 +217,8 @@ close_scope(flag)
assert(sc != 0);
if (! sc->sc_end) {
sc->sc_end = dot2leaf(Link);
}
FreeNode(sc->sc_end);
sc->sc_end = dot2leaf(Link);
if (flag) {
DO_DEBUG(options['S'],(print("List of definitions in currently ended scope:\n"), DumpScope(sc->sc_def)));