]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Darwin: fix warning about unused Helgrind sem_timedwait wrapper
authorPaul Floyd <pjfloyd@wanadoo.fr>
Sun, 31 Mar 2024 09:23:49 +0000 (11:23 +0200)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Sun, 31 Mar 2024 09:23:49 +0000 (11:23 +0200)
helgrind/hg_intercepts.c

index 28dca3c715092a4d72a7f7e54d890fde8fb29273..8f883e6af793119f97699cf6e01e6af08e9443cb 100644 (file)
@@ -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
 
 
 //-----------------------------------------------------------