Skip to content

Commit

Permalink
config/kernel-inode-times: initialize timespec
Browse files Browse the repository at this point in the history
Usage of this variable uninitialized triggers -Werror,-Wuninitialized
when compiled under clang for linux kernel 5.6, leading the build system
to believe that the function is not declared.

This commit initializes the variable to suppress the warning and fix the
build for kernel 5.6 with clang.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Hiếu Lê <leorize+oss@disroot.org>
Closes openzfs#10279
Closes openzfs#10281
  • Loading branch information
alaviss authored May 4, 2020
1 parent 6f3e1a4 commit 3e5d41d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions config/kernel-inode-times.m4
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_TIMES], [
struct timespec64 ts;
struct inode ip;
memset(&ts, 0, sizeof(ts));
ts = timestamp_truncate(ts, &ip);
])
Expand Down

0 comments on commit 3e5d41d

Please sign in to comment.