SynEdit: suppress warnings for "managed local var not initialized" 5091 / Mark SetLength(Result) with {%H-} where needed

This commit is contained in:
Martin 2025-02-23 11:39:35 +01:00
parent 4a1b682e2e
commit 9487a177c5
4 changed files with 4 additions and 4 deletions

View File

@ -16,7 +16,7 @@
</CodeGeneration> </CodeGeneration>
<Other> <Other>
<CompilerMessages> <CompilerMessages>
<IgnoredMessages idx6058="True" idx5024="True" idx4055="True"/> <IgnoredMessages idx6058="True" idx5091="True" idx5024="True" idx4055="True"/>
</CompilerMessages> </CompilerMessages>
<CustomOptions Value="$(IDEBuildOptions) -CR -dgc"/> <CustomOptions Value="$(IDEBuildOptions) -CR -dgc"/>
</Other> </Other>

View File

@ -478,7 +478,7 @@ begin
ISrc := 1; ISrc := 1;
DestLen := SrcLen; DestLen := SrcLen;
IDest := 1; IDest := 1;
SetLength(Result, DestLen); SetLength(Result{%H-}, DestLen);
while ISrc <= SrcLen do begin while ISrc <= SrcLen do begin
c := AToken[ISrc]; c := AToken[ISrc];
IsSpace := IsSpace and (c = ' '); IsSpace := IsSpace and (c = ' ');

View File

@ -3128,7 +3128,7 @@ var
i: Integer; i: Integer;
begin begin
i := FoldOpenCount(ALine); i := FoldOpenCount(ALine);
SetLength(Result, i); SetLength(Result{%H-}, i);
while i > 0 do begin while i > 0 do begin
dec(i); dec(i);
Result[i] := InfoForFoldAtTextIndex(ALine, i, False, NeedLen); Result[i] := InfoForFoldAtTextIndex(ALine, i, False, NeedLen);

View File

@ -960,7 +960,7 @@ var
begin begin
TCustomSynEdit(FriendEdit).GetHighlighterAttriAtRowColEx(APos, Ctx, FLastContextLine = APos.Y); TCustomSynEdit(FriendEdit).GetHighlighterAttriAtRowColEx(APos, Ctx, FLastContextLine = APos.Y);
FLastContextLine := APos.Y; FLastContextLine := APos.Y;
SetLength(Result, SizeOf(Integer)); SetLength(Result{%H-}, SizeOf(Integer));
PInteger(@Result[1])^ := Ctx; PInteger(@Result[1])^ := Ctx;
end; end;