[Lazarus] PDF generator, try 2
Michael Van Canneyt
michael at freepascal.org
Thu Apr 7 12:37:52 CEST 2016
On Thu, 7 Apr 2016, Graeme Geldenhuys wrote:
> On 2016-03-31 16:48, silvioprog wrote:
>> +{$IFDEF VER3}
>> + Buffer := Default(TBuffer)
>> +{$ELSE}
>> + FillChar(Buffer,SizeOf(TBuffer),0)
>> +{$ENDIF};
>
>
> Just thought I would mention, I've seen the above code listed a few
> times now to remove the famous "Local variable does not seem to be
> initialized" compiler hint.
>
> Well, it might work on FPC 3.0 (not test), but it does nothing for FPC
> 2.6.4 - the hint is always there. I know it is a harmless hint, if the
> code was correct to start work.
>
> Either way, I found a solution for that, which I used in fpGUI's DocView
> help viewer application too.
>
> Implement the following:
>
> procedure FillMem(Dest: pointer; Size: longint; Data: Byte );
> begin
> FillChar(Dest^, Size, Data);
> end;
You will get the hint here then, no ?
Michael.
More information about the Lazarus
mailing list