madExcept causes compilation errors in Delphi 10.2
Posted: Sun May 28, 2017 12:05 am
We treat uninitialized variable warning as an error which makes impossible madexcept to compile under Win64 because of invalid way of casting used which is triggering warnings now
NativeUInt(sh) := NativeUInt(mh) + sizeOf(TImageNtHeaders64)
Instead of casting left side you should cast right side to pointer this will not trigger compiler warning.
sh := Pointer(mh + sizeOf(TImageNtHeaders64))
It does not have to be typed pointer. The problem appears in madExcept.pas and in madMapFile.pas
NativeUInt(sh) := NativeUInt(mh) + sizeOf(TImageNtHeaders64)
Instead of casting left side you should cast right side to pointer this will not trigger compiler warning.
sh := Pointer(mh + sizeOf(TImageNtHeaders64))
It does not have to be typed pointer. The problem appears in madExcept.pas and in madMapFile.pas