mirror of
https://github.com/google/benchmark.git
synced 2025-04-17 23:12:30 +08:00
windows warnings
This commit is contained in:
parent
074489b445
commit
8efc18efe1
@ -350,7 +350,7 @@ std::vector<CPUInfo::CacheInfo> GetCacheSizesWindows() {
|
||||
CPUInfo::CacheInfo C;
|
||||
C.num_sharing = static_cast<int>(b.count());
|
||||
C.level = cache.Level;
|
||||
C.size = cache.Size;
|
||||
C.size = static_cast<int>(cache.Size);
|
||||
C.type = "Unknown";
|
||||
switch (cache.Type) {
|
||||
case CacheUnified:
|
||||
@ -485,9 +485,8 @@ int GetNumCPUsImpl() {
|
||||
// positives.
|
||||
std::memset(&sysinfo, 0, sizeof(SYSTEM_INFO));
|
||||
GetSystemInfo(&sysinfo);
|
||||
return sysinfo.dwNumberOfProcessors; // number of logical
|
||||
// processors in the current
|
||||
// group
|
||||
// number of logical processors in the current group
|
||||
return static_cast<int>(sysinfo.dwNumberOfProcessors);
|
||||
#elif defined(BENCHMARK_OS_SOLARIS)
|
||||
// Returns -1 in case of a failure.
|
||||
long num_cpu = sysconf(_SC_NPROCESSORS_ONLN);
|
||||
|
Loading…
Reference in New Issue
Block a user