mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-31 10:50:14 +02:00
* fixed showing of warnings for uninitialised function results
git-svn-id: trunk@1897 -
This commit is contained in:
parent
2dea0c793f
commit
7996bb3b06
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user