From b0f3b64a25bcd3a6a4cebc00866dea86590fac3e Mon Sep 17 00:00:00 2001 From: Radek Zikmund Date: Thu, 12 Feb 2026 15:24:15 +0100 Subject: [PATCH] liblzma/MSVC: Add a cast to fix a warning (C4057) with __cpuid() __cpuid from MSVC (and also the old Intel ICC) use int[], while __get_cpuid from in GCC and Clang use unsigned int[]. Adding a cast is the simplest fix. Link: https://github.com/tukaani-project/xz/pull/208 --- src/liblzma/check/crc_x86_clmul.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/liblzma/check/crc_x86_clmul.h b/src/liblzma/check/crc_x86_clmul.h index b302d6cf..35653623 100644 --- a/src/liblzma/check/crc_x86_clmul.h +++ b/src/liblzma/check/crc_x86_clmul.h @@ -344,7 +344,7 @@ is_arch_extension_supported(void) #if defined(_MSC_VER) // This needs with MSVC. ICC has it as a built-in // on all platforms. - __cpuid(r, 1); + __cpuid((int *)r, 1); #elif defined(HAVE_CPUID_H) // Compared to just using __asm__ to run CPUID, this also checks // that CPUID is supported and saves and restores ebx as that is