Skip to content

Commit

Permalink
Fix compile warning on Apple M1
Browse files Browse the repository at this point in the history
  • Loading branch information
BrettDong authored and odygrd committed May 13, 2023
1 parent 290e360 commit 575b118
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions quill/include/quill/detail/misc/Rdtsc.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ QUILL_NODISCARD_ALWAYS_INLINE_HOT uint64_t rdtsc() noexcept
// read at CNTFRQ special register. We assume the OS has set up the virtual timer properly.
int64_t virtual_timer_value;
__asm__ volatile("mrs %0, cntvct_el0" : "=r"(virtual_timer_value));
return virtual_timer_value;
return static_cast<uint64_t>(virtual_timer_value);
}
#elif defined(__ARM_ARCH)
QUILL_NODISCARD_ALWAYS_INLINE_HOT uint64_t rdtsc() noexcept
Expand Down Expand Up @@ -77,4 +77,4 @@ QUILL_NODISCARD_ALWAYS_INLINE_HOT uint64_t rdtsc() noexcept
QUILL_NODISCARD_ALWAYS_INLINE_HOT uint64_t rdtsc() noexcept { return __rdtsc(); }
#endif

} // namespace quill::detail
} // namespace quill::detail

0 comments on commit 575b118

Please sign in to comment.