From 19100f8af5b3776ec8b2138a3479a91cce9a1337 Mon Sep 17 00:00:00 2001 From: The Tumultuous Unicorn Of Darkness Date: Mon, 9 Oct 2023 18:56:59 +0200 Subject: [PATCH] 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; --- libcpuid/cpuid_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcpuid/cpuid_main.c b/libcpuid/cpuid_main.c index 9ef38ef..9ca8650 100644 --- a/libcpuid/cpuid_main.c +++ b/libcpuid/cpuid_main.c @@ -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];