summaryrefslogtreecommitdiff
path: root/ipc
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-06-09 16:26:23 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-09 16:59:03 -0700
commit586c7e6a280580fd94b662bf486f9bb31098d14b (patch)
tree27547e0dc35c34431f9504ad51b70ccccc55c14f /ipc
parent13df635f080d411a152c92087a384135c1562fac (diff)
downloadlinux-3.10-586c7e6a280580fd94b662bf486f9bb31098d14b.tar.gz
linux-3.10-586c7e6a280580fd94b662bf486f9bb31098d14b.tar.bz2
linux-3.10-586c7e6a280580fd94b662bf486f9bb31098d14b.zip
shm: fix unused warnings on nommu
The massive nommu update (8feae131) 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>
Diffstat (limited to 'ipc')
-rw-r--r--ipc/shm.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ipc/shm.c b/ipc/shm.c
index faa46da99eb..42597160048 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -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;