Fix warning with MacOS (#1276)
* Fix warning with MacOS
Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
* Re-trigger GitHub actions
Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
* Fix style
Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
* Revert "Fix style"
This reverts commit 1d5fe9ce8718a73333ae6a6fa24a38ca7224f646.
* Fix style only on changes
Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
diff --git a/src/timers.cc b/src/timers.cc
index 1f05574..ac5b72d 100644
--- a/src/timers.cc
+++ b/src/timers.cc
@@ -154,8 +154,9 @@
mach_msg_type_number_t count = THREAD_BASIC_INFO_COUNT;
thread_basic_info_data_t info;
mach_port_t thread = pthread_mach_thread_np(pthread_self());
- if (thread_info(thread, THREAD_BASIC_INFO, (thread_info_t)&info, &count) ==
- KERN_SUCCESS) {
+ if (thread_info(thread, THREAD_BASIC_INFO,
+ reinterpret_cast<thread_info_t>(&info),
+ &count) == KERN_SUCCESS) {
return MakeTime(info);
}
DiagnoseAndExit("ThreadCPUUsage() failed when evaluating thread_info");