Local variable "TmpBuf" does not seem to be initialized lazarus / 9-Editor ---------------------------------------------------------------------- wnhoo · 2009-04-11 03:26 function RecvData(s:Longint;Var Buf;BufLen,Flags:Longint):Longint; var   rt:Integer;   TmpBuf:array[0..1023] of byte; begin   Result:=recv(s,Buf,BufLen,Flags);   Fillchar(TmpBuf,Sizeof(TmpBuf),0);   if Result>0 then   begin     repeat        rt:=recv(s,TmpBuf,1024,0);     until rt<=0;   end; end; =========================================== Compiler: PosG32.pas(335,25) Hint: Local variable "TmpBuf" does not seem to be initialized =========================================== Local variable "TmpBuf" be initialized : Fillchar(TmpBuf,Sizeof(TmpBuf),0); Why? ---------------------------------------------------------------------- Loesje · 2009-04-11 08:54 We can't tell you as long as we don't know what 'recv' is and how it's defined. Define the second parameter of 'recv' as 'out', and your problem will be gone. ---------------------------------------------------------------------- Leledumbo · 2009-04-13 03:03 I believe it's a socket program. The hint is correct, since the compiler consider you are 'giving values' will be used by the function, instead of 'giving space' for the function to fill with.