Skip to content

Commit

Permalink
Fix warning in cpu_ident_apic_id()
Browse files Browse the repository at this point in the history
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;
  • Loading branch information
TheTumultuousUnicornOfDarkness committed Oct 9, 2023
1 parent 02237e6 commit 19100f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libcpuid/cpuid_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];

Expand Down

0 comments on commit 19100f8

Please sign in to comment.