There are some false positive warnings.
For example this construct can be found in Lazarus IDE code frequently.
function IDEDirectiveNameToDirective(const DirectiveName: string):
TIDEDirective;
begin
for Result:=Low(TIDEDirective) to High(TIDEDirective) do
if CompareText(IDEDirectiveNames[Result],DirectiveName)=0 then exit;
Result:=idedNone;
end;
Compiled with -Oodfa gives :
buildfiledlg.pas(406,44) Warning: Function result variable does not
seem to initialized
which is wrong.
There are also thousands of hints about variable "$self" that make no
sense to me, like :
initialsetupdlgs.pas(563,27) Hint: Variable "$self" does not seem to
be initialized
How does the compiler come to that conclusion?
Juha
_______________________________________________
fpc-devel maillist - [email protected]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel