* fixed showing of warnings for uninitialised function results

git-svn-id: trunk@1897 -
This commit is contained in:
Jonas Maebe 2005-12-07 16:12:01 +00:00
parent 2dea0c793f
commit 7996bb3b06
2 changed files with 4 additions and 3 deletions

View File

@ -776,8 +776,9 @@ implementation
{ Give warning/note for uninitialized locals }
if assigned(hsym.owner) and
not(vo_is_external in hsym.varoptions) and
(hsym.owner.symtabletype in [localsymtable,staticsymtable]) and
(hsym.owner=current_procinfo.procdef.localst) then
(hsym.owner.symtabletype in [parasymtable,localsymtable,staticsymtable]) and
((hsym.owner=current_procinfo.procdef.localst) or
(vo_is_funcret in hsym.varoptions)) then
begin
if (vo_is_funcret in hsym.varoptions) then
CGMessage(sym_w_function_result_not_set)

View File

@ -701,7 +701,7 @@ implementation
{ also don't count the value parameters which have local copies }
{ also don't claim for high param of open parameters (PM) }
if (Errorcount<>0) or
(vo_is_hidden_para in tabstractvarsym(p).varoptions) then
([vo_is_hidden_para,vo_is_funcret] * tabstractvarsym(p).varoptions = [vo_is_hidden_para]) then
exit;
if (tstoredsym(p).refs=0) then
begin