Hi, I asked a question about a compiler hint in the fpc-users mailing list. As JoshyFun suggested, is it not maybe better to change FillChar() definition so first parameter is a out parameter - to prevent unnecessary compiler hint in code?
-------- Original Message -------- Subject: Re: [fpc-pascal] How to solve "variable does not seem to be initialized" compiler hint. Date: Tue, 17 Nov 2009 11:45:39 +0100 From: JoshyFun <joshy...@gmail.com> Reply-To: FPC-Pascal users discussions <fpc-pas...@lists.freepascal.org> To: Graeme Geldenhuys <grae...@opensoft.homeip.net>, FPC-Pascal users discussions <fpc-pas...@lists.freepascal.org> References: <4b0274ea.3000...@mastermaths.co.za> 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 -------------------------------------- Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/ _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel