From e023409500ea1ccf8e6f69b03aa44dc96bf05920 Mon Sep 17 00:00:00 2001 From: Bill McGonigle Date: Fri, 13 Mar 2015 09:44:42 -0700 Subject: [PATCH] Linux 4.0 compat: bdi_setup_and_register() __must_check Explicitly disable the unused by variable warnings by setting __attribute__((unused)) for bdi_setup_and_register(). This is required because the function is defined with the __must_check attribute. Signed-off-by: Bill McGonigle Signed-off-by: Brian Behlendorf Closes #3141 --- config/kernel-bdi-setup-and-register.m4 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config/kernel-bdi-setup-and-register.m4 b/config/kernel-bdi-setup-and-register.m4 index f13d1fe53..11eefb28b 100644 --- a/config/kernel-bdi-setup-and-register.m4 +++ b/config/kernel-bdi-setup-and-register.m4 @@ -10,7 +10,8 @@ AC_DEFUN([ZFS_AC_KERNEL_BDI_SETUP_AND_REGISTER], [ ], [ struct backing_dev_info bdi; char *name = "bdi"; - (void) bdi_setup_and_register(&bdi, name); + int error __attribute__((unused)) = + bdi_setup_and_register(&bdi, name); ], [bdi_setup_and_register], [mm/backing-dev.c], [ AC_MSG_RESULT(yes) AC_DEFINE(HAVE_2ARGS_BDI_SETUP_AND_REGISTER, 1, @@ -24,7 +25,8 @@ AC_DEFUN([ZFS_AC_KERNEL_BDI_SETUP_AND_REGISTER], [ struct backing_dev_info bdi; char *name = "bdi"; unsigned int cap = BDI_CAP_MAP_COPY; - (void) bdi_setup_and_register(&bdi, name, cap); + int error __attribute__((unused)) = + bdi_setup_and_register(&bdi, name, cap); ], [bdi_setup_and_register], [mm/backing-dev.c], [ AC_MSG_RESULT(yes) AC_DEFINE(HAVE_3ARGS_BDI_SETUP_AND_REGISTER, 1,