Re: [fpc-pascal] Conversion between ordinals and pointers is not portable

2011-03-02 Thread Max Vlasov
On Wed, Mar 2, 2011 at 12:33 PM, Jonas Maebe wrote: > > On 02 Mar 2011, at 09:02, Roland Turcan wrote: > > ... >> p := PByteArray (PtrUInt (@FData.Content[0]) + MOffset); >> ... >> >> >> But the compiler informs about %subj%. >> >> How to get rid of this warning and to make code portable? >> >

Re: [fpc-pascal] Conversion between ordinals and pointers is not portable

2011-03-02 Thread Tomas Hajny
On Wed, March 2, 2011 09:02, Roland Turcan wrote: Hello, > I have this code: . . > p := PByteArray (PtrUInt (@FData.Content[0]) + MOffset); > ... > > > But the compiler informs about %subj%. > > How to get rid of this warning and to make code portable? At least with 2.4.2 it is not a warn

Re: [fpc-pascal] Conversion between ordinals and pointers is not portable

2011-03-02 Thread Jonas Maebe
On 02 Mar 2011, at 09:02, Roland Turcan wrote: ... p := PByteArray (PtrUInt (@FData.Content[0]) + MOffset); ... But the compiler informs about %subj%. How to get rid of this warning and to make code portable? Typecast to PByte instead of to PtrUInt. Jonas _

[fpc-pascal] Conversion between ordinals and pointers is not portable

2011-03-02 Thread Roland Turcan
Hello all, I have this code: TYPE PRDBRecord =^TRDBRecord; TRDBRecord =PACKED RECORD Content :ARRAY [0..65500] OF BYTE; END; VAR MOffset:INTEGER; p :PByteArray; FData :PRDBRecord; ... p := PByteArray (PtrUInt (@FData.Content[0]