From a04bb579dc2e4dcdbf89af21f176ed29fad47e24 Mon Sep 17 00:00:00 2001 From: Ilya Sorochan Date: Tue, 19 Nov 2024 15:40:46 +0300 Subject: [PATCH] Force LoongArchCPUInfoParser::TotalLogicalCount() to return int on all code paths --- Common/LoongArchCPUDetect.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Common/LoongArchCPUDetect.cpp b/Common/LoongArchCPUDetect.cpp index 0382b98a38..0e4d7e6909 100644 --- a/Common/LoongArchCPUDetect.cpp +++ b/Common/LoongArchCPUDetect.cpp @@ -94,15 +94,11 @@ int LoongArchCPUInfoParser::TotalLogicalCount() { int low, high, found; std::getline(presentFile, line); found = sscanf(line.c_str(), "%d-%d", &low, &high); - if (found == 1){ - return 1; - } if (found == 2){ return high - low + 1; } - }else{ - return 1; } + return 1; } #endif