From d8c3f3365a275029cb79a8a6c4851c8741f13a61 Mon Sep 17 00:00:00 2001 From: The Tumultuous Unicorn Of Darkness Date: Fri, 11 Nov 2022 17:50:01 +0100 Subject: [PATCH] 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] --- libcpuid/rdmsr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcpuid/rdmsr.c b/libcpuid/rdmsr.c index 94d33c1..06219d6 100644 --- a/libcpuid/rdmsr.c +++ b/libcpuid/rdmsr.c @@ -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, ®); - 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; }