gcc-4.6: pagemap: avoid unused-but-set variable
authorAndi Kleen <andi@firstfloor.org>
Tue, 10 Aug 2010 00:19:02 +0000 (17:19 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 10 Aug 2010 03:44:58 +0000 (20:44 -0700)
Avoid quite a lot of warnings in header files in a gcc 4.6 -Wall builds

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/pagemap.h

index 3c62ed4084922c4f01977bb48ceb18ab4ce805d8..78a702ce4fcb0e194c6f8483d4f79631a4d932ad 100644 (file)
@@ -423,8 +423,10 @@ static inline int fault_in_pages_readable(const char __user *uaddr, int size)
                const char __user *end = uaddr + size - 1;
 
                if (((unsigned long)uaddr & PAGE_MASK) !=
-                               ((unsigned long)end & PAGE_MASK))
+                               ((unsigned long)end & PAGE_MASK)) {
                        ret = __get_user(c, end);
+                       (void)c;
+               }
        }
        return ret;
 }