Skip to content

Commit 8d4fdd6

Browse files
authored
Fix build errors on QuRT (Hexagon) (#1938)
1 parent 9514292 commit 8d4fdd6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/cycleclock.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ inline BENCHMARK_ALWAYS_INLINE int64_t Now() {
219219
#elif defined(__hexagon__)
220220
uint64_t pcycle;
221221
asm volatile("%0 = C15:14" : "=r"(pcycle));
222-
return static_cast<double>(pcycle);
222+
return static_cast<int64_t>(pcycle);
223223
#elif defined(__alpha__)
224224
// Alpha has a cycle counter, the PCC register, but it is an unsigned 32-bit
225225
// integer and thus wraps every ~4s, making using it for tick counts

src/sysinfo.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ int GetNumCPUsImpl() {
509509
if (qurt_sysenv_get_max_hw_threads(&hardware_threads) != QURT_EOK) {
510510
hardware_threads.max_hthreads = 1;
511511
}
512-
return hardware_threads.max_hthreads;
512+
return static_cast<int>(hardware_threads.max_hthreads);
513513
#elif defined(BENCHMARK_HAS_SYSCTL)
514514
// *BSD, macOS
515515
int num_cpu = -1;

0 commit comments

Comments
 (0)