mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 10:39:39 +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
|
begin
|
||||||
if count <= 0 then
|
if count <= 0 then
|
||||||
exit;
|
exit;
|
||||||
bcopy(source,dest,count);
|
bcopy(source,dest,size_t(count));
|
||||||
end;
|
end;
|
||||||
{$endif not FPC_SYSTEM_HAS_MOVE}
|
{$endif not FPC_SYSTEM_HAS_MOVE}
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ Procedure FillChar(var x;count: sizeint;value:byte);{$ifdef SYSTEMINLINE}inline;
|
|||||||
begin
|
begin
|
||||||
if count <= 0 then
|
if count <= 0 then
|
||||||
exit;
|
exit;
|
||||||
memset(x,value,count);
|
memset(x,value,size_t(count));
|
||||||
end;
|
end;
|
||||||
{$endif FPC_SYSTEM_HAS_FILLCHAR}
|
{$endif FPC_SYSTEM_HAS_FILLCHAR}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user