Whamcloud - gitweb
LU-18821 build: fix [-Werror=pointer-to-int-cast] error 40/58440/2
authorJian Yu <yujian@whamcloud.com>
Mon, 17 Mar 2025 17:11:17 +0000 (10:11 -0700)
committerOleg Drokin <green@whamcloud.com>
Wed, 26 Mar 2025 04:06:20 +0000 (04:06 +0000)
commit532ed744188343cc3dc058ec96f55df94a6c8dab
treebc039037a37e4540c84cf9a32f1ee093912e22ca
parent3a12de16bf479f056d86d2b11b068978eb3f889a
LU-18821 build: fix [-Werror=pointer-to-int-cast] error

This patch fixes the following error on 32-bit architectures
by replacing the __u64 cast with uintptr_t, which is either
32-bit or 64-bit:

  lustre/include/obd_class.h: In function 'obd_quota_iter':
  lustre/include/obd_class.h:1289:39: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
   1289 |                 oqctl->qc_iter_list = (__u64)list;
        |                                       ^
  cc1: all warnings being treated as errors

Change-Id: I5938a4c09a50010ce3b99bc6f978fed5cc32a5d6
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58440
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/obd_class.h
lustre/llite/dir.c
lustre/lmv/lmv_obd.c
lustre/lov/lov_obd.c
lustre/mdc/mdc_request.c
lustre/osc/osc_quota.c