[fpc-pascal] How to solve "variable does not seem to be initialized" compiler hint.

JoshyFun joshyfun at gmail.com
Tue Nov 17 11:45:39 CET 2009


Hello Graeme,

Tuesday, November 17, 2009, 11:03:22 AM, you wrote:

GG> /home/graemeg/programming/3rdParty/DCPcrypt/dcpblockciphers.pas(229,16)
GG> Hint: Local variable "Temp" does not seem to be initialized
[...]
GG>     raise EDCP_blockcipher.Create('Cipher not initialized');
GG>   p1:= @Indata;
GG>   p2:= @Outdata;

Insert this, or in other words "use it". The reason is that "fillchar"
first parameter is "var" instead "out".

Temp[0]:=0;

GG>   FillChar(Temp, SizeOf(Temp), 0); // <-- I added this to no affect
GG>   for i:= 1 to Size do

-- 
Best regards,
 JoshyFun




More information about the fpc-pascal mailing list