util: Fixes unused parameter warnings
authorYonggang Luo <luoyonggang@gmail.com>
Fri, 18 Feb 2022 19:38:29 +0000 (03:38 +0800)
committerMarge Bot <emma+marge@anholt.net>
Thu, 24 Mar 2022 21:56:48 +0000 (21:56 +0000)
The compiler warning:
```
../src/mesa/util/u_thread.h: In function 'util_thread_get_time_nano':
../src/mesa/util/u_thread.h:239:34: warning: unused parameter 'thread' [-Wunused-parameter]
  239 | util_thread_get_time_nano(thrd_t thread)
      |                           ~~~~~~~^~~~~~
```

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15553>

src/util/u_thread.h

index ec50537..cc8241b 100644 (file)
@@ -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(thrd_t thread)
+util_thread_get_time_nano(ASSERTED thrd_t thread)
 {
 #if defined(HAVE_PTHREAD) && !defined(__APPLE__) && !defined(__HAIKU__)
    struct timespec ts;