<br><br><div class="gmail_quote">On Wed, Mar 2, 2011 at 12:33 PM, Jonas Maebe <span dir="ltr"><<a href="mailto:jonas.maebe@elis.ugent.be">jonas.maebe@elis.ugent.be</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im"><br>
On 02 Mar 2011, at 09:02, Roland Turcan wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
...<br>
p := PByteArray (PtrUInt (@FData.Content[0]) + MOffset);<br>
...<br>
<br>
<br>
But the compiler informs about %subj%.<br>
<br>
How to get rid of this warning and to make code portable?<br>
</blockquote>
<br></div>
Typecast to PByte instead of to PtrUInt.<br><font color="#888888">
</font><br></blockquote></div><br><br>If Roland wants to keep compatibility with Delphi for some reasons, I suggest using something like <br>
<br>
{$ifdef fpc}<br>
AddrInt = PByte;<br>
{$else}<br>
AddrInt = integer;<br>
{$endif}<br><br>if this approach is used the line <br> PByteArray (AddrInt(@FData.Content[0]) + MOffset)<br>should not lead to any question both from fpc and Delphi<br><br>Max<br>