Skip to content

Commit 4ff1133

Browse files
szuberskandrewc12
authored andcommitted
Fix clang 13 compilation errors
``` os/linux/zfs/zvol_os.c:1111:3: error: ignoring return value of function declared with 'warn_unused_result' attribute [-Werror,-Wunused-result] add_disk(zv->zv_zso->zvo_disk); ^~~~~~~~ ~~~~~~~~~~~~~~~~~~~~ zpl_xattr.c:1579:1: warning: no previous prototype for function 'zpl_posix_acl_release_impl' [-Wmissing-prototypes] ``` Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: szubersk <[email protected]> Closes openzfs#13551
1 parent fca812b commit 4ff1133

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

config/kernel-add-disk.m4

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_ADD_DISK], [
77
#include <linux/blkdev.h>
88
], [
99
struct gendisk *disk = NULL;
10-
int err = add_disk(disk);
11-
err = err;
10+
int error __attribute__ ((unused)) = add_disk(disk);
1211
])
1312
])
1413

module/os/linux/zfs/zpl_xattr.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
#include <sys/zap.h>
8484
#include <sys/vfs.h>
8585
#include <sys/zpl.h>
86+
#include <linux/vfs_compat.h>
8687

8788
enum xattr_permission {
8889
XAPERM_DENY,
@@ -1495,7 +1496,9 @@ zpl_xattr_permission(xattr_filldir_t *xf, const char *name, int name_len)
14951496
return (perm);
14961497
}
14971498

1498-
#if !defined(HAVE_POSIX_ACL_RELEASE) || defined(HAVE_POSIX_ACL_RELEASE_GPL_ONLY)
1499+
#if defined(CONFIG_FS_POSIX_ACL) && \
1500+
(!defined(HAVE_POSIX_ACL_RELEASE) || \
1501+
defined(HAVE_POSIX_ACL_RELEASE_GPL_ONLY))
14991502
struct acl_rel_struct {
15001503
struct acl_rel_struct *next;
15011504
struct posix_acl *acl;

0 commit comments

Comments
 (0)