From a673a722af9668ce8339349e400f51b42223d7da Mon Sep 17 00:00:00 2001
From: Brad King <brad.king@kitware.com>
Date: Mon, 13 Feb 2017 11:06:25 -0500
Subject: [PATCH] SystemInformation: Fix -Wconversion warning

Fix warning introduced by commit 9c4230b7 (SystemInformation: Fix counts
of logical and physical cores, 2017-01-26).
---
 SystemInformation.cxx | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/SystemInformation.cxx b/SystemInformation.cxx
index fc1a752..86f7552 100644
--- a/SystemInformation.cxx
+++ b/SystemInformation.cxx
@@ -3421,9 +3421,10 @@ bool SystemInformationImplementation::RetreiveInformationFromCpuInfoFile()
   // We want to record the total number of cores in this->NumberOfPhysicalCPU
   // (checking only the first proc)
   std::string Cores = this->ExtractValueFromCpuInfoFile(buffer, "cpu cores");
-  int NumberOfCoresPerSocket = atoi(Cores.c_str());
-  NumberOfCoresPerSocket = std::max(NumberOfCoresPerSocket, 1);
-  this->NumberOfPhysicalCPU = NumberOfCoresPerSocket * NumberOfSockets;
+  unsigned int NumberOfCoresPerSocket = (unsigned int)atoi(Cores.c_str());
+  NumberOfCoresPerSocket = std::max(NumberOfCoresPerSocket, 1u);
+  this->NumberOfPhysicalCPU =
+    NumberOfCoresPerSocket * (unsigned int)NumberOfSockets;
 
 #else // __CYGWIN__
   // does not have "physical id" entries, neither "cpu cores"
-- 
GitLab