From: Paul Floyd Date: Sun, 31 Mar 2024 09:23:49 +0000 (+0200) Subject: Darwin: fix warning about unused Helgrind sem_timedwait wrapper X-Git-Tag: VALGRIND_3_23_0~75 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fff77374334d9c93d6ab8593bdc204712a0a23af;p=thirdparty%2Fvalgrind.git Darwin: fix warning about unused Helgrind sem_timedwait wrapper --- diff --git a/helgrind/hg_intercepts.c b/helgrind/hg_intercepts.c index 28dca3c71..8f883e6af 100644 --- a/helgrind/hg_intercepts.c +++ b/helgrind/hg_intercepts.c @@ -3264,6 +3264,7 @@ PTH_FUNC(int, semaZutrywait, sem_t *sem) { /* sema_trywait */ // FreeBSD: sem_timedwait (libc) // /* trywait: decrement semaphore if non-zero otherwise return error */ +#if !defined(VGO_darwin) __attribute__((noinline)) static int sem_timedwait_WRK(sem_t* sem, const struct timespec* abs_timeout) { @@ -3302,10 +3303,6 @@ PTH_FUNC(int, semZutimedwait, sem_t* sem, const struct timespec* abs_timeout) { PTH_FUNC(int, semZutimedwaitZAZa, sem_t* sem, const struct timespec* abs_timeout) { /* sem_timedwait@* */ return sem_timedwait_WRK(sem, abs_timeout); } -#elif defined(VGO_darwin) - -// does not exist - #elif defined(VGO_freebsd) LIBC_FUNC(int, semZutimedwait, sem_t* sem, const struct timespec* abs_timeout) { /* sem_timedwait */ return sem_timedwait_WRK(sem, abs_timeout); @@ -3317,6 +3314,7 @@ PTH_FUNC(int, semaZutimedwait, sem_t *sem, const struct timespec* abs_timeout) { #else # error "Unsupported OS" #endif +#endif // not VGO_darwin //-----------------------------------------------------------