[fpc-pascal] How to solve "Conversion between ordinals and pointers is not portable"
Graeme Geldenhuys
graeme at mastermaths.co.za
Tue Nov 17 10:02:37 CET 2009
Hi,
How to I solve this compiler hint? I've managed to get DCPCrypt
compiled and running successfully (with my current tests) under 64-bit
FPC & Linux.
But I still have many compiler hints as listed below. Can I simply
ignore them, or is there a way I can fix the code to remove the compiler
warning. How serious is this hint?
/home/graemeg/programming/3rdParty/DCPcrypt/dcpcrypt2.pas(653,37) Hint:
Conversion between ordinals and pointers is not portable
---------------------------------
procedure XorBlock(var InData1, InData2; Size: longword);
var
i: longword;
begin
for i:= 1 to Size do
Pbyte(PtrUInt(@InData1)+i-1)^ :=
Pbyte(PtrUInt(@InData1)+i-1)^ xor
Pbyte(PtrUInt(@InData2)+i-1)^;
end;
---------------------------------
1 2 3 4 5 6 7
123456789012345678901234567890123456789012345678901234567890123456789012345
Regards,
- Graeme -
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/
More information about the fpc-pascal
mailing list