Fix C-style typecasting in QNX-specific code (#1739)

C-style typecasting breaks the build due to `-Werror=old-style-cast` which should remain in place.
This commit is contained in:
Aleksey 2024-01-16 15:28:04 +03:00 committed by GitHub
parent ea71a14891
commit 3d293cd67a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -777,8 +777,9 @@ double GetCPUCyclesPerSecond(CPUInfo::Scaling scaling) {
kstat_close(kc);
return clock_hz;
#elif defined(BENCHMARK_OS_QNX)
return static_cast<double>((int64_t)(SYSPAGE_ENTRY(cpuinfo)->speed) *
(int64_t)(1000 * 1000));
return static_cast<double>(
static_cast<int64_t>(SYSPAGE_ENTRY(cpuinfo)->speed) *
static_cast<int64_t>(1000 * 1000));
#elif defined(BENCHMARK_OS_QURT)
// QuRT doesn't provide any API to query Hexagon frequency.
return 1000000000;