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 
(cherry picked from commit 3e5d41d)
  • Loading branch information
alaviss authored and as-com committed Jun 20, 2020
1 parent a4a2fdd commit 191fd0a
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 191fd0a

Please sign in to comment.