mark file parameters as used in reads/writes
This commit is contained in:
parent
a1a816ddc2
commit
d992ed4935
|
@ -36,6 +36,7 @@ ChkRead(arg)
|
||||||
error("\"%s\": variable-access expected", name);
|
error("\"%s\": variable-access expected", name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
MarkUsed(file);
|
||||||
}
|
}
|
||||||
else if( !(file = ChkStdInOut(name, 0)) )
|
else if( !(file = ChkStdInOut(name, 0)) )
|
||||||
return;
|
return;
|
||||||
|
@ -112,6 +113,7 @@ ChkReadln(arg)
|
||||||
else {
|
else {
|
||||||
file = arg->nd_left;
|
file = arg->nd_left;
|
||||||
arg = arg->nd_right;
|
arg = arg->nd_right;
|
||||||
|
MarkUsed(file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( !(file = ChkStdInOut(name, 0)) )
|
else if( !(file = ChkStdInOut(name, 0)) )
|
||||||
|
@ -159,6 +161,7 @@ ChkWrite(arg)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
file = expp;
|
file = expp;
|
||||||
|
MarkUsed(file);
|
||||||
arg = arg->nd_right;
|
arg = arg->nd_right;
|
||||||
if( !arg ) {
|
if( !arg ) {
|
||||||
error("\"%s\": expression expected", name);
|
error("\"%s\": expression expected", name);
|
||||||
|
@ -211,6 +214,7 @@ ChkWriteln(arg)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
file = expp;
|
file = expp;
|
||||||
|
MarkUsed(file);
|
||||||
arg = arg->nd_right;
|
arg = arg->nd_right;
|
||||||
}
|
}
|
||||||
else if( !(file = ChkStdInOut(name, 1)) )
|
else if( !(file = ChkStdInOut(name, 1)) )
|
||||||
|
|
Loading…
Reference in a new issue