fcl-passrc: less hints

This commit is contained in:
mattias 2023-05-14 10:01:18 +02:00
parent b445e679e7
commit f3c94ccbce
2 changed files with 22 additions and 19 deletions

View File

@ -18,6 +18,7 @@
{$ENDIF}
{$IF FPC_FULLVERSION>30100}
{$warn 6058 off} // cannot inline
{$warn 6058 off : cannot inline}
{$WARN 6018 off : Unreachable code}
{$ENDIF}

View File

@ -948,6 +948,7 @@ end;
function TPasTreeContainer.HandleResultOnError(aElement: TPasElement): Boolean;
begin
if aElement=nil then ;
Result:=True;
end;
@ -1487,8 +1488,6 @@ function TPasParser.TryErrorRecovery(const aContext: TRecoveryContext): boolean;
var
StopAt : TTokens;
tk : TToken;
begin
Inc(FErrorCount);
Result:=FErrorCount<FMaxErrorCount;
@ -5978,23 +5977,26 @@ begin
Scanner.SetNonToken(tkobjccategory);
Scanner.SetNonToken(tkobjcprotocol);
Scanner.SetNonToken(tkobjcclass);
repeat
NextToken;
// writeln('TPasParser.ParseProcBeginBlock ',curtokenstring);
if CurToken=tkend then
break
else if CurToken<>tkSemiColon then
begin
UngetToken;
ParseStatement(BeginBlock,SubBlock);
if SubBlock=nil then
ExpectToken(tkend);
end;
until false;
try
repeat
NextToken;
// writeln('TPasParser.ParseProcBeginBlock ',curtokenstring);
if CurToken=tkend then
break
else if CurToken<>tkSemiColon then
begin
UngetToken;
ParseStatement(BeginBlock,SubBlock);
if SubBlock=nil then
ExpectToken(tkend);
end;
until false;
finally
Scanner.UnSetNonToken(tkobjccategory);
Scanner.UnSetNonToken(tkobjcprotocol);
Scanner.UnSetNonToken(tkobjcclass);
end;
// A declaration can follow...
Scanner.UnSetNonToken(tkobjccategory);
Scanner.UnSetNonToken(tkobjcprotocol);
Scanner.UnSetNonToken(tkobjcclass);
Proc:=Parent.Parent as TPasProcedure;
if Proc.GetProcTypeEnum in [ptAnonymousProcedure,ptAnonymousFunction] then
NextToken