Skip to content

Commit

Permalink
shm: fix unused warnings on nommu
Browse files Browse the repository at this point in the history
The massive nommu update (8feae13) resulted in these warnings:
ipc/shm.c: In function `sys_shmdt':
ipc/shm.c:974: warning: unused variable `size'
ipc/shm.c:972: warning: unused variable `next'

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
vapier authored and torvalds committed Jun 9, 2009
1 parent 13df635 commit 586c7e6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ipc/shm.c
Original file line number Diff line number Diff line change
Expand Up @@ -969,10 +969,13 @@ SYSCALL_DEFINE3(shmat, int, shmid, char __user *, shmaddr, int, shmflg)
SYSCALL_DEFINE1(shmdt, char __user *, shmaddr)
{
struct mm_struct *mm = current->mm;
struct vm_area_struct *vma, *next;
struct vm_area_struct *vma;
unsigned long addr = (unsigned long)shmaddr;
loff_t size = 0;
int retval = -EINVAL;
#ifdef CONFIG_MMU
loff_t size = 0;
struct vm_area_struct *next;
#endif

if (addr & ~PAGE_MASK)
return retval;
Expand Down

0 comments on commit 586c7e6

Please sign in to comment.