I have a projectgroup in which all Win32 programs have the same ..\PatchLibs search path. This folder contains a patched System.Win.Ctrl.pas containing:
{$IFDEF WIN32}
function _malloc(size: size_t): Pointer; cdecl;
begin
if (size > MaxInt) then
begin
Result := Nil
end
else
begin
try
Result := AllocMem(size);
except
Result := Nil;
end;
end;
end;
[This patch suppresses an error in midaslib (QC 104337)]
The issue:
One of the (smaller) projects gives a W1023 ("comparing signed and unsigned types") compiler warning on the 'MaxInt' line, all others build without warnings.
None of the projects have System.Win.Ctrl in their uses statements or in their project files.
Thinking there might be two typed constant definitions for Maxint I wanted to prefix Maxint with the 'correct' unit name, but can't find its definition.
I have searched through all available c:\program files (x86)\embarcadero\rad studio\9.0\source*.* files, but found no definitions.
System.MaxInt works but does not eliminate the warning.
Typecasting Cardinal(MaxInt) removes the warning, but I'd still prefer the 'fully qualified' solution.
(size_t is defined as ULONG_PTR is defined as NativeUInt)
I found Quality Central issue 102873, 69836 and 53202 but these refer to duplicate definitions C++ .h header files
Is my assumption about more than one definition correct? If so, what would/should the unit prefix be? And most important: why do I get the compiler warning for that one project build only?