From d5b79811197d72e29219038c130e0e417d671947 Mon Sep 17 00:00:00 2001 From: Antonio Sanchez Date: Wed, 20 Jan 2021 08:34:00 -0800 Subject: Fix signed-unsigned comparison. Hex literals are interpreted as unsigned, leading to a comparison between signed max supported function `abcd[0]` (which was negative) to the unsigned literal `0x80000006`. Should not change result since signed is implicitly converted to unsigned for the comparison, but eliminates the warning. --- Eigen/src/Core/util/Memory.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Eigen/src/Core/util') diff --git a/Eigen/src/Core/util/Memory.h b/Eigen/src/Core/util/Memory.h index e06cb9192..14713aaa7 100644 --- a/Eigen/src/Core/util/Memory.h +++ b/Eigen/src/Core/util/Memory.h @@ -1061,7 +1061,7 @@ inline void queryCacheSizes_amd(int& l1, int& l2, int& l3) // First query the max supported function. EIGEN_CPUID(abcd,0x80000000,0); - if(abcd[0] >= 0x80000006) + if(static_cast(abcd[0]) >= static_cast(0x80000006)) { EIGEN_CPUID(abcd,0x80000005,0); l1 = (abcd[2] >> 24) * 1024; // C[31:24] = L1 size in KB -- cgit v1.2.3