|
@@ -1334,7 +1334,12 @@ implementation
|
|
{ iterate through life info of the first node }
|
|
{ iterate through life info of the first node }
|
|
for i:=0 to dfabuilder.nodemap.count-1 do
|
|
for i:=0 to dfabuilder.nodemap.count-1 do
|
|
begin
|
|
begin
|
|
- if DFASetIn(GetUserCode.optinfo^.life,i) then
|
|
|
|
|
|
+ if DFASetIn(GetUserCode.optinfo^.life,i) and
|
|
|
|
+ { do not warn about parameters passed by var }
|
|
|
|
+ not((tnode(dfabuilder.nodemap[i]).nodetype=loadn) and (tloadnode(dfabuilder.nodemap[i]).symtableentry.typ=paravarsym) and
|
|
|
|
+ (tparavarsym(tloadnode(dfabuilder.nodemap[i]).symtableentry).varspez=vs_var) and
|
|
|
|
+ { function result is passed by var but it must be initialized }
|
|
|
|
+ not(vo_is_funcret in tparavarsym(tloadnode(dfabuilder.nodemap[i]).symtableentry).varoptions)) then
|
|
CheckAndWarn(GetUserCode,tnode(dfabuilder.nodemap[i]));
|
|
CheckAndWarn(GetUserCode,tnode(dfabuilder.nodemap[i]));
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|