From 61a3a8c6ce4e6d42c900ce83cc69256e0b0589a3 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 27 Jan 2018 17:17:49 +0100 Subject: hurd: fix warning timer_ptr2id and timer_id2ptr are used to convert between application-visible timer_t and struct timer_node *. timer_ptr2id was made to use void * instead of timer_t in 49b650430eb5 ('Update.') for no reason. It happens that on Linux timer_t is void *, so both that change and this commit are no-ops there, but not on systems where timer_t is not void *. Using timer_ptr2id for filling sival_ptr also does not make sense since that actually is a void *. * sysdeps/pthread/posix-timer.h (timer_ptr2id): Cast to timer_t instead of void *. * sysdeps/pthread/timer_create.c (timer_create): Do not use timer_ptr2id to cast struct timer_node * to void *. --- sysdeps/pthread/posix-timer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sysdeps/pthread/posix-timer.h') diff --git a/sysdeps/pthread/posix-timer.h b/sysdeps/pthread/posix-timer.h index 82311706d8..d7af9a017a 100644 --- a/sysdeps/pthread/posix-timer.h +++ b/sysdeps/pthread/posix-timer.h @@ -87,7 +87,7 @@ extern struct thread_node __timer_signal_thread_rclk; /* Return pointer to timer structure corresponding to ID. */ #define timer_id2ptr(timerid) ((struct timer_node *) timerid) -#define timer_ptr2id(timerid) ((void *) timerid) +#define timer_ptr2id(timerid) ((timer_t) timerid) /* Check whether timer is valid; global mutex must be held. */ static inline int -- cgit 1.4.1