From fdab3cb777ccfe38fbaff60f7eb10e3939cc9683 Mon Sep 17 00:00:00 2001 From: Sohei Koyama Date: Fri, 6 Dec 2024 13:12:39 +0900 Subject: [PATCH] LU-18517 quota: fix LC_HAVE_DQUOT_QC_DQBLK check When compiling with clang, the HAVE_DQUOT_QC_DQBLK check always fails with "error: indirection of non-volatile null pointer will be deleted, not trap". Signed-off-by: Sohei Koyama Change-Id: I8cbdfd70bef8164e40d19d68dc4127c6f40bd693 Test-Parameters: trivial Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57320 Tested-by: Maloo Tested-by: jenkins Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Reviewed-by: Shaun Tancheff --- lustre/autoconf/lustre-core.m4 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index f201ffd..6243a4c 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -1246,7 +1246,10 @@ AC_DEFUN([LC_SRC_HAVE_DQUOT_QC_DQBLK], [ #include #include ],[ - ((struct quotactl_ops *)0)->set_dqblk(NULL, *((struct kqid*)0), (struct qc_dqblk*)0); + struct quotactl_ops *ops = NULL; + struct kqid kqid = { .type = USRQUOTA }; + struct qc_dqblk *qc = NULL; + ops->set_dqblk(NULL, kqid, qc); ],[-Werror]) ]) AC_DEFUN([LC_HAVE_DQUOT_QC_DQBLK], [ -- 1.8.3.1