1
0
Fork 0
mirror of https://github.com/anrieff/libcpuid synced 2024-12-16 16:35:45 +00:00

Fix warning in cpu_ident_apic_id()

cpuid_main.c: In function 'cpu_identify_all':
cpuid_main.c:940:81: warning: 'smt_mask' may be used uninitialized [-Wmaybe-uninitialized]
  940 |         uint32_t mask_smt_shift, core_plus_mask_width, package_mask, core_mask, smt_mask;
This commit is contained in:
The Tumultuous Unicorn Of Darkness 2023-10-09 18:56:59 +02:00
parent 02237e67f5
commit 19100f8af5
No known key found for this signature in database
GPG key ID: 1E55EE2EFF18BC1A

View file

@ -937,7 +937,7 @@ static bool cpu_ident_apic_id(logical_cpu_t logical_cpu, struct cpu_raw_data_t*
uint8_t subleaf;
uint8_t level_type = 0;
uint8_t mask_core_shift = 0;
uint32_t mask_smt_shift, core_plus_mask_width, package_mask, core_mask, smt_mask;
uint32_t mask_smt_shift, core_plus_mask_width, package_mask, core_mask, smt_mask = 0;
cpu_vendor_t vendor = VENDOR_UNKNOWN;
char vendor_str[VENDOR_STR_MAX];