Browse Source

fcl-js: fixed warnings

git-svn-id: trunk@39437 -
Mattias Gaertner 7 years ago
parent
commit
620888b54e
2 changed files with 3 additions and 0 deletions
  1. 1 0
      packages/fcl-js/src/jssrcmap.pas
  2. 2 0
      packages/fcl-js/src/jswriter.pp

+ 1 - 0
packages/fcl-js/src/jssrcmap.pas

@@ -953,6 +953,7 @@ var
   P: TJSONParser;
   Data: TJSONData;
 begin
+  s:='';
   SetLength(s,aStream.Size-aStream.Position);
   if s<>'' then
     aStream.Read(s[1],length(s));

+ 2 - 0
packages/fcl-js/src/jswriter.pp

@@ -226,6 +226,7 @@ end;
 
 function TBufferWriter.GetAsAnsistring: AnsiString;
 begin
+  Result:='';
   SetLength(Result,BufferLength);
   if (BufferLength>0) then
     Move(FBuffer[0],Result[1],BufferLength);
@@ -248,6 +249,7 @@ Var
 
 begin
   SL:=BufferLength div SizeOf(UnicodeChar); // Silently ignores last byte
+  Result:='';
   SetLength(Result,SL);
   if (SL>0) then
     Move(FBuffer[0],Result[1],SL*SizeOf(UnicodeChar));