Whamcloud - gitweb
LU-17948 pcc: fix llapi_pcc_del() -Werror=enum-int-mismatch 17/55417/3
authorJian Yu <yujian@whamcloud.com>
Thu, 13 Jun 2024 00:07:07 +0000 (17:07 -0700)
committerOleg Drokin <green@whamcloud.com>
Tue, 25 Jun 2024 03:33:33 +0000 (03:33 +0000)
commit5ef6f3459355e16fd27427e45ff417e93589c960
tree1c7d31fcf07ce30662fa99ffa0a0cdaa620c0d99
parent37486afa73573be6b4ce363038a9ce27d36101ee
LU-17948 pcc: fix llapi_pcc_del() -Werror=enum-int-mismatch

gcc 13 does not allow mixing of enum and integer
types between function declaration and implementation.

This patch fixes the following build failures:
liblustreapi_pcc.c:755:5: error:
conflicting types for 'llapi_pcc_del' due to enum/integer mismatch;
have 'int(const char *, const char *, enum lu_pcc_cleanup_flags)'
[-Werror=enum-int-mismatch]
  755 | int llapi_pcc_del(const char *mntpath, const char *pccpath,
      |     ^~~~~~~~~~~~~

liblustreapi_pcc.c:790:5: error:
conflicting types for 'llapi_pcc_clear' due to enum/integer mismatch;
have 'int(const char *, enum lu_pcc_cleanup_flags)' [-Werror=enum-int-mismatch]
  790 | int llapi_pcc_clear(const char *mntpath, enum lu_pcc_cleanup_flags flags)
      |     ^~~~~~~~~~~~~~~

Test-Parameters: trivial testlist=sanity-pcc

Change-Id: I2900b59a609410c6faab78d24f6176bc5c268e98
Fixes: 0d7d9ae ("LU-17657 build: gcc 13 stricter enum checking")
Fixes: c74878c ("LU-12373 pcc: uncache the pcc copies when remove a PCC backend")
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55417
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/include/lustre/lustreapi.h