From 1df41288722e146c69570f54c97c8745187faa55 Mon Sep 17 00:00:00 2001 From: Christopher Hoffman Date: Fri, 4 Apr 2025 17:51:42 +0000 Subject: [PATCH] test: clean up some warnings Signed-off-by: Christopher Hoffman --- src/client/Client.cc | 2 +- src/include/cephfs/libcephfs.h | 1 + src/test/libcephfs/fscrypt.cc | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/client/Client.cc b/src/client/Client.cc index c56570c86d5..2f99714cb05 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -11361,7 +11361,7 @@ success: // r is expected to hold value of effective bytes read. // in the case of fscrypt, this will be the logical size. So if all bytes read // is equal to read_len, then display logical size. - if (read_len == read) { + if ((int)read_len == read) { r = len; } else { r = read; diff --git a/src/include/cephfs/libcephfs.h b/src/include/cephfs/libcephfs.h index b07298c3185..598f5b1a4d3 100644 --- a/src/include/cephfs/libcephfs.h +++ b/src/include/cephfs/libcephfs.h @@ -133,6 +133,7 @@ struct ceph_ll_io_info { struct ceph_fscrypt_key_identifier; struct fscrypt_policy_v2; +struct fscrypt_remove_key_arg; /* setattr mask bits (up to an int in size) */ #ifndef CEPH_SETATTR_MODE diff --git a/src/test/libcephfs/fscrypt.cc b/src/test/libcephfs/fscrypt.cc index b9aa2935db9..b076e512133 100644 --- a/src/test/libcephfs/fscrypt.cc +++ b/src/test/libcephfs/fscrypt.cc @@ -175,7 +175,7 @@ int fscrypt_encrypt(const string& dir_path) return r; } - for (int i = 0; i < sizeof(fscrypt_key); ++i) { + for (int i = 0; i < (int)sizeof(fscrypt_key); ++i) { fscrypt_key[i] = (char)rand(); } -- 2.39.5