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
madExcept causes compilation errors in Delphi 10.2
Re: madExcept causes compilation errors in Delphi 10.2
We ran into the same problem and I too would prefer to do the casting only on the right side.
Although, it should be
sh := Pointer(NativeUInt(mh) + sizeOf(TImageNtHeaders64)) ,
otherwise you'll get an error E2015: Operator not applicable to this operand type
It also affects unit madTools.pas from the madBasic package.
Although, it should be
sh := Pointer(NativeUInt(mh) + sizeOf(TImageNtHeaders64)) ,
otherwise you'll get an error E2015: Operator not applicable to this operand type
It also affects unit madTools.pas from the madBasic package.
Re: madExcept causes compilation errors in Delphi 10.2
Somewhat strange. These warnings don't seem to show up if I batch compile madExcept. I'm wondering why you're recompiling madExcept.pas, anyway? Why not simply using the precompiled DCUs I'm shipping with madExcept.
Anyway, I'll have a look at these warnigs. Although I have to say, they don't make sense to me. IMHO the code "NativeUInt(sh) := NativeUInt(mh) + sizeOf(TImageNtHeaders64)" is perfectly fine!
Anyway, I'll have a look at these warnigs. Although I have to say, they don't make sense to me. IMHO the code "NativeUInt(sh) := NativeUInt(mh) + sizeOf(TImageNtHeaders64)" is perfectly fine!