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 <bill-github.com-public1@bfccomputing.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #3141
This commit is contained in:
Bill McGonigle 2015-03-13 09:44:42 -07:00 committed by Brian Behlendorf
parent 4c7b7eedcd
commit e023409500
1 changed files with 4 additions and 2 deletions

View File

@ -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,