diff --git a/lib/libc/gen/_spinlock_stub.c b/lib/libc/gen/_spinlock_stub.c index a130c8e46e84..47bbfeb3fbdc 100644 --- a/lib/libc/gen/_spinlock_stub.c +++ b/lib/libc/gen/_spinlock_stub.c @@ -34,6 +34,11 @@ __FBSDID("$FreeBSD$"); #include "spinlock.h" +long _atomic_lock_stub(volatile long *); +void _spinlock_stub(spinlock_t *); +void _spinunlock_stub(spinlock_t *); +void _spinlock_debug_stub(spinlock_t *, char *, int); + /* * Declare weak definitions in case the application is not linked * with libpthread. @@ -43,12 +48,11 @@ __weak_reference(_spinlock_stub, _spinlock); __weak_reference(_spinunlock_stub, _spinunlock); __weak_reference(_spinlock_debug_stub, _spinlock_debug); - /* * This function is a stub for the _atomic_lock function in libpthread. */ long -_atomic_lock_stub(volatile long *lck) +_atomic_lock_stub(volatile long *lck __unused) { return (0L); } @@ -58,7 +62,7 @@ _atomic_lock_stub(volatile long *lck) * This function is a stub for the spinlock function in libpthread. */ void -_spinlock_stub(spinlock_t *lck) +_spinlock_stub(spinlock_t *lck __unused) { } @@ -66,7 +70,7 @@ _spinlock_stub(spinlock_t *lck) * This function is a stub for the spinunlock function in libpthread. */ void -_spinunlock_stub(spinlock_t *lck) +_spinunlock_stub(spinlock_t *lck __unused) { } @@ -74,6 +78,6 @@ _spinunlock_stub(spinlock_t *lck) * This function is a stub for the debug spinlock function in libpthread. */ void -_spinlock_debug_stub(spinlock_t *lck, char *fname, int lineno) +_spinlock_debug_stub(spinlock_t *lck __unused, char *fname __unused, int lineno __unused) { }