From a7d5f29ace40618a366413e0e09a75eb021ff54a Mon Sep 17 00:00:00 2001 From: FrankXie Date: Fri, 15 Nov 2024 07:31:20 +0000 Subject: [PATCH] [MSVC] Replace #warning with compatible directives for MSVC --- libcpuid/cpuid_main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libcpuid/cpuid_main.c b/libcpuid/cpuid_main.c index ec64e32..2d55d4d 100644 --- a/libcpuid/cpuid_main.c +++ b/libcpuid/cpuid_main.c @@ -1459,8 +1459,12 @@ int cpuid_get_raw_data_core(struct cpu_raw_data_t* data, logical_cpu_t logical_c # endif /* PLATFORM_AARCH64 */ } #else -# warning This CPU architecture is not supported by libcpuid - UNUSED(data); + #if defined(_MSC_VER) + #pragma message("Warning: This CPU architecture is not supported by libcpuid") + #else + #warning This CPU architecture is not supported by libcpuid + #endif + UNUSED(data); #endif if (affinity_saved)