mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 18:09:27 +02:00
* 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:
parent
8f61df817a
commit
5442e9f9d8
@ -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}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user