[PATCH 2/3] kernel32: Fix tick count calculation on Mac.
cdavis at codeweavers.com
Tue Nov 26 22:52:43 CST 2019
November 26, 2019 10:40 PM, "Dmitry Timoshkov" <dmitry at baikal.ru> wrote:
> Chip Davis <cdavis at codeweavers.com> wrote:
>> +#ifdef HAVE_MACH_CONTINUOUS_TIME
>> + if (&mach_continuous_time != NULL)
>> + return mach_continuous_time() * timebase.numer / timebase.denom / 100;
> While the compiler will fix it for you it would still be better to use
> 'if (mach_continuous_time != NULL)' IMO, so that even if the type of
> the 'mach_continuous_time' is a real function pointer it still works.
> Same applies to the next patch. That's a pure cosmetics though.
In the case that mach_continuous_time is linked strong, which it will be if -mmacosx-version-min=10.12 or higher, the compiler will warn if I *don't* use '&'.
More information about the wine-devel