mirror of
https://github.com/anrieff/libcpuid
synced 2024-11-10 22:59:13 +00:00
fix build warning
This commit is contained in:
parent
a9925a4c19
commit
03695167d7
1 changed files with 1 additions and 1 deletions
|
@ -1358,7 +1358,7 @@ int cpu_identify_all(struct cpu_raw_data_array_t* raw_array, struct system_id_t*
|
||||||
/* Note: if SMT is disabled by BIOS, smt_divisor will no reflect the current state properly */
|
/* Note: if SMT is disabled by BIOS, smt_divisor will no reflect the current state properly */
|
||||||
is_smt_supported = system->cpu_types[cpu_type_index].num_cores > 0 ? (system->cpu_types[cpu_type_index].num_logical_cpus % system->cpu_types[cpu_type_index].num_cores) == 0 : false;
|
is_smt_supported = system->cpu_types[cpu_type_index].num_cores > 0 ? (system->cpu_types[cpu_type_index].num_logical_cpus % system->cpu_types[cpu_type_index].num_cores) == 0 : false;
|
||||||
smt_divisor = is_smt_supported ? system->cpu_types[cpu_type_index].num_logical_cpus / system->cpu_types[cpu_type_index].num_cores : 1.0;
|
smt_divisor = is_smt_supported ? system->cpu_types[cpu_type_index].num_logical_cpus / system->cpu_types[cpu_type_index].num_cores : 1.0;
|
||||||
system->cpu_types[cpu_type_index].num_cores = (int32_t) num_logical_cpus / smt_divisor;
|
system->cpu_types[cpu_type_index].num_cores = (int32_t) (num_logical_cpus / smt_divisor);
|
||||||
}
|
}
|
||||||
/* Save current values in system->cpu_types[cpu_type_index] and reset values for the next purpose */
|
/* Save current values in system->cpu_types[cpu_type_index] and reset values for the next purpose */
|
||||||
system->cpu_types[cpu_type_index].num_logical_cpus = num_logical_cpus;
|
system->cpu_types[cpu_type_index].num_logical_cpus = num_logical_cpus;
|
||||||
|
|
Loading…
Reference in a new issue