1
0
Fork 0
mirror of https://github.com/anrieff/libcpuid synced 2024-11-10 22:59:13 +00:00

Fix warning in rdmsr.c

D:\a\libcpuid\libcpuid\libcpuid\rdmsr.c(945,46): warning C4244: 'function': conversion from 'uint64_t' to 'uint32_t', possible loss of data [D:\a\libcpuid\libcpuid\libcpuid\libcpuid_vc10.vcxproj]
This commit is contained in:
The Tumultuous Unicorn Of Darkness 2022-11-11 17:50:01 +01:00
parent d84493e6ca
commit d8c3f3365a
No known key found for this signature in database
GPG key ID: 1E55EE2EFF18BC1A

View file

@ -942,7 +942,7 @@ static double get_info_bus_clock(struct msr_info_t *info)
PstateMaxVal is the the lowest-performance non-boosted P-state */
addr = get_amd_last_pstate_addr(info);
err = cpu_rdmsr_range(info->handle, MSR_PSTATE_L, 6, 4, &reg);
err += get_amd_multipliers(info, addr - reg, &mult);
err += get_amd_multipliers(info, addr - (uint32_t) reg, &mult);
if (!err) return (double) info->cpu_clock / mult;
}