From 97424e0b24bcbbc63e3cd81b7f473ec2218fd3d4 Mon Sep 17 00:00:00 2001 From: Shaun Tancheff Date: Tue, 31 Jan 2023 11:39:47 -0800 Subject: [PATCH] LU-16116 build: Configure tests for rhltable, bitmap_alloc... MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit rhel8.6 with kernel 5.18 breaks a couple of compile tests struct rhltable test fails with: ... error: ‘hlt’ is used uninitialized in this function [-Werror=uninitialized] rdma_wr() test failes with: ... error: assignment discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] wr = rdma_wr(NULL); Lustre-change: https://review.whamcloud.com/48361 Lustre-commit: 009faf132dc47dcfb604b95c93211da7d2c644e2 Test-Parameters: trivial HPE-bug-id: LUS-11191 Signed-off-by: Shaun Tancheff Change-Id: Ib2b1d223ac809cea157158fe35fd2535b04367df Reviewed-by: Andreas Dilger Reviewed-by: Jian Yu Reviewed-by: Petros Koutoupis Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/49848 Tested-by: jenkins Tested-by: Maloo --- libcfs/autoconf/lustre-libcfs.m4 | 2 +- lnet/autoconf/lustre-lnet.m4 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libcfs/autoconf/lustre-libcfs.m4 b/libcfs/autoconf/lustre-libcfs.m4 index 420da3e..fbae889 100644 --- a/libcfs/autoconf/lustre-libcfs.m4 +++ b/libcfs/autoconf/lustre-libcfs.m4 @@ -704,7 +704,7 @@ LB_CHECK_COMPILE([does 'struct rhltable' exist], rhtable, [ #include ],[ - struct rhltable *hlt; + struct rhltable *hlt = NULL; rhltable_destroy(hlt); ],[ diff --git a/lnet/autoconf/lustre-lnet.m4 b/lnet/autoconf/lustre-lnet.m4 index 13a70e91..fd6cb5d 100644 --- a/lnet/autoconf/lustre-lnet.m4 +++ b/lnet/autoconf/lustre-lnet.m4 @@ -425,7 +425,7 @@ AS_IF([test $ENABLEO2IB != "no"], [ #endif #include ],[ - struct ib_rdma_wr *wr __attribute__ ((unused)); + const struct ib_rdma_wr *wr __attribute__ ((unused)); wr = rdma_wr(NULL); ],[ -- 1.8.3.1