* insert explicit type cast for the count parameter of move/fillchar wrapping C functions,

avoids a warning in combination with -O3 and negative count values

git-svn-id: trunk@49205 -
This commit is contained in:
florian 2021-04-14 19:02:54 +00:00
parent 8f61df817a
commit 5442e9f9d8

View File

@ -28,7 +28,7 @@ procedure Move(const source;var dest;count:sizeint); [public, alias: 'FPC_MOVE']
begin
if count <= 0 then
exit;
bcopy(source,dest,count);
bcopy(source,dest,size_t(count));
end;
{$endif not FPC_SYSTEM_HAS_MOVE}
@ -41,7 +41,7 @@ Procedure FillChar(var x;count: sizeint;value:byte);{$ifdef SYSTEMINLINE}inline;
begin
if count <= 0 then
exit;
memset(x,value,count);
memset(x,value,size_t(count));
end;
{$endif FPC_SYSTEM_HAS_FILLCHAR}