Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1491006
| From | Dave Chinner <david@fromorbit.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] [4.8-rc7, regression] fault_in_multipages_readable() throws set-but-unused error |
| Date | 2016-09-26 02:00 +0200 |
| Message-ID | <slruV-4Hx-5@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
From: Dave Chinner <dchinner@redhat.com>
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 e23d415 ("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>
---
include/linux/pagemap.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index 7e3d537..01e8443 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;
}
--
2.8.0.rc3
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] [4.8-rc7, regression] fault_in_multipages_readable() throws set-but-unused error Dave Chinner <david@fromorbit.com> - 2016-09-26 02:00 +0200
Re: [PATCH] [4.8-rc7, regression] fault_in_multipages_readable() throws set-but-unused error Linus Torvalds <torvalds@linux-foundation.org> - 2016-09-26 03:30 +0200
Re: [PATCH] [4.8-rc7, regression] fault_in_multipages_readable() throws set-but-unused error Dave Chinner <david@fromorbit.com> - 2016-09-26 04:30 +0200
Re: [PATCH] [4.8-rc7, regression] fault_in_multipages_readable() throws set-but-unused error Linus Torvalds <torvalds@linux-foundation.org> - 2016-09-26 05:10 +0200
Re: [PATCH] [4.8-rc7, regression] fault_in_multipages_readable() throws set-but-unused error Stephen Rothwell <sfr@canb.auug.org.au> - 2016-09-26 13:30 +0200
csiph-web