Skip to content

Commit

Permalink
fixed warning with latest Delphi compilers
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnaud Bouchez committed Nov 29, 2022
1 parent cc75d85 commit 3180c24
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions src/core/mormot.core.os.windows.inc
Original file line number Diff line number Diff line change
Expand Up @@ -4371,7 +4371,8 @@ type
Size: DWORD;
CacheType: TSystemLogicalProcessorCache;
end);
RelationGroup: (Reserved: array [0..1] of QWord);
RelationGroup: (
Reserved: array [0..1] of QWord); // to define the actual struct size
end;
{$A+}

Expand Down Expand Up @@ -4616,8 +4617,8 @@ begin
cpu := RawUtf8(GetEnvironmentVariable('PROCESSOR_IDENTIFIER'));
if Assigned(GetLogicalProcessorInformation) then
begin
SetLength(proc, 512);
siz := SizeOf(proc[0]) * 512;
SetLength(proc, 1024);
siz := SizeOf(proc[0]) * length(proc);
if GetLogicalProcessorInformation(proc[0], @siz) then
begin
for i := 0 to (siz div SizeOf(proc[0])) - 1 do
Expand Down
2 changes: 1 addition & 1 deletion src/core/mormot.core.text.pas
Original file line number Diff line number Diff line change
Expand Up @@ -10322,7 +10322,7 @@ function MicroSecFrom(Start: QWord): TShort16;
stop: Int64;
begin
QueryPerformanceMicroSeconds(stop);
MicroSecToString(stop - Start, result);
MicroSecToString(stop - Int64(Start), result);
end;

procedure By100ToTwoDigitString(value: cardinal; const valueunit: ShortString;
Expand Down
2 changes: 1 addition & 1 deletion src/mormot.commit.inc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
'2.0.4381'
'2.0.4382'

0 comments on commit 3180c24

Please sign in to comment.