diff options
author | Dave Chinner <dchinner@redhat.com> | 2016-09-26 02:57:33 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-09-26 04:16:44 +0300 |
commit | 90b75db6498a19da96dac4b55c909ff3721f3045 (patch) | |
tree | fa40265db710d5f6b599eeeeac14f5df7ec37842 /include/linux/pagemap.h | |
parent | 38e088546522e1e86d2b8f401a1354ad3a9b3303 (diff) | |
download | linux-90b75db6498a19da96dac4b55c909ff3721f3045.tar.xz |
fault_in_multipages_readable() throws set-but-unused error
When building XFS with -Werror, it now fails with:
include/linux/pagemap.h: In function 'fault_in_multipages_readable':
include/linux/pagemap.h:602:16: error: variable 'c' set but not used [-Werror=unused-but-set-variable]
volatile char c;
^
This is a regression caused by commit e23d4159b109 ("fix
fault_in_multipages_...() on architectures with no-op access_ok()").
Fix it by re-adding the "(void)c" trick taht was previously used to make
the compiler think the variable is used.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/pagemap.h')
-rw-r--r-- | include/linux/pagemap.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 7e3d53753612..01e84436cddf 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h @@ -620,6 +620,7 @@ static inline int fault_in_multipages_readable(const char __user *uaddr, return __get_user(c, end); } + (void)c; return 0; } |