From c91e3c6a428825ef10630ac891ccb79d5116dd65 Mon Sep 17 00:00:00 2001 From: Yonggang Luo Date: Wed, 30 Mar 2022 04:24:42 +0800 Subject: [PATCH] util: Should not use ASSERTED in util_thread_get_time_nano The parameter is not ASSERTED Fixes: 0f1b3fc17f0 ("util: Fixes unused parameter warnings") Signed-off-by: Yonggang Luo Reviewed-by: Yiwei Zhang Part-of: --- src/util/u_thread.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/util/u_thread.h b/src/util/u_thread.h index cc8241b767d..d06ff6beddb 100644 --- a/src/util/u_thread.h +++ b/src/util/u_thread.h @@ -236,7 +236,7 @@ util_set_current_thread_affinity(const uint32_t *mask, /* Return the time of a thread's CPU time clock. */ static inline int64_t -util_thread_get_time_nano(ASSERTED thrd_t thread) +util_thread_get_time_nano(thrd_t thread) { #if defined(HAVE_PTHREAD) && !defined(__APPLE__) && !defined(__HAIKU__) struct timespec ts; @@ -246,6 +246,7 @@ util_thread_get_time_nano(ASSERTED thrd_t thread) clock_gettime(cid, &ts); return (int64_t)ts.tv_sec * 1000000000 + ts.tv_nsec; #else + (void)thread; return 0; #endif }