mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 02:59:13 +02:00
fcl-js: fixed warnings
git-svn-id: trunk@39437 -
This commit is contained in:
parent
b2e349cecf
commit
620888b54e
@ -953,6 +953,7 @@ var
|
|||||||
P: TJSONParser;
|
P: TJSONParser;
|
||||||
Data: TJSONData;
|
Data: TJSONData;
|
||||||
begin
|
begin
|
||||||
|
s:='';
|
||||||
SetLength(s,aStream.Size-aStream.Position);
|
SetLength(s,aStream.Size-aStream.Position);
|
||||||
if s<>'' then
|
if s<>'' then
|
||||||
aStream.Read(s[1],length(s));
|
aStream.Read(s[1],length(s));
|
||||||
|
@ -226,6 +226,7 @@ end;
|
|||||||
|
|
||||||
function TBufferWriter.GetAsAnsistring: AnsiString;
|
function TBufferWriter.GetAsAnsistring: AnsiString;
|
||||||
begin
|
begin
|
||||||
|
Result:='';
|
||||||
SetLength(Result,BufferLength);
|
SetLength(Result,BufferLength);
|
||||||
if (BufferLength>0) then
|
if (BufferLength>0) then
|
||||||
Move(FBuffer[0],Result[1],BufferLength);
|
Move(FBuffer[0],Result[1],BufferLength);
|
||||||
@ -248,6 +249,7 @@ Var
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
SL:=BufferLength div SizeOf(UnicodeChar); // Silently ignores last byte
|
SL:=BufferLength div SizeOf(UnicodeChar); // Silently ignores last byte
|
||||||
|
Result:='';
|
||||||
SetLength(Result,SL);
|
SetLength(Result,SL);
|
||||||
if (SL>0) then
|
if (SL>0) then
|
||||||
Move(FBuffer[0],Result[1],SL*SizeOf(UnicodeChar));
|
Move(FBuffer[0],Result[1],SL*SizeOf(UnicodeChar));
|
||||||
|
Loading…
Reference in New Issue
Block a user