From e92584001a07a7e1a4ad2a4997a429075d36e76a Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Tue, 6 Mar 2012 11:15:26 -0800 Subject: Fix several build warnings on sparc. / * sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c (set_obp_int): New function. (get_obp_int): New function. (__get_clockfreq_via_dev_openprom): Likewise. * sysdeps/unix/sysv/linux/sparc/sysdep.h (INTERNAL_SYSCALL_ERROR_P): Avoid unused variable warnings on 'val' and use builtin_expect. (INLINE_SYSCALL): Don't wrap INTERNAL_SYSCALL_ERROR_P with builtin_expect. (INLINE_CLONE_SYSCALL): Likewise. nptl/ * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use atomic_increment and remove unused local variable. (__old_sem_post): Likewise. --- nptl/sysdeps/unix/sysv/linux/sparc/sem_post.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'nptl/sysdeps/unix/sysv/linux/sparc/sem_post.c') diff --git a/nptl/sysdeps/unix/sysv/linux/sparc/sem_post.c b/nptl/sysdeps/unix/sysv/linux/sparc/sem_post.c index 0b829927d6..28e06f6327 100644 --- a/nptl/sysdeps/unix/sysv/linux/sparc/sem_post.c +++ b/nptl/sysdeps/unix/sysv/linux/sparc/sem_post.c @@ -30,7 +30,7 @@ __new_sem_post (sem_t *sem) { struct sparc_new_sem *isem = (struct sparc_new_sem *) sem; - int nr = atomic_increment_val (&isem->value); + atomic_increment (&isem->value); atomic_full_barrier (); if (isem->nwaiters > 0) { @@ -53,10 +53,11 @@ attribute_compat_text_section __old_sem_post (sem_t *sem) { struct sparc_old_sem *isem = (struct sparc_old_sem *) sem; + int err; - int nr = atomic_increment_val (&isem->value); - int err = lll_futex_wake (&isem->value, 1, - isem->private ^ FUTEX_PRIVATE_FLAG); + atomic_increment (&isem->value); + err = lll_futex_wake (&isem->value, 1, + isem->private ^ FUTEX_PRIVATE_FLAG); if (__builtin_expect (err, 0) < 0) { __set_errno (-err); -- cgit 1.4.1