From c67fb7316ef9ad580509814189eaf99ad16d798d Mon Sep 17 00:00:00 2001 From: yuval Lifshitz Date: Thu, 10 Nov 2022 15:21:56 +0200 Subject: [PATCH] rgw/file: change function signature to match the one generated by cython without this change, clang16 fails to compile, due to conversion from "bool" to "int". see error: https://paste.sh/QybPVNdh#OtffZeqJKcsqUVMupPYD11Kl Signed-off-by: yuval Lifshitz --- src/include/rados/rgw_file.h | 2 +- src/test/librgw_file.cc | 4 ++-- src/test/librgw_file_gp.cc | 2 +- src/test/librgw_file_marker.cc | 2 +- src/test/librgw_file_nfsns.cc | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/include/rados/rgw_file.h b/src/include/rados/rgw_file.h index eb2d6dc4d82ea..e1ea4559323b5 100644 --- a/src/include/rados/rgw_file.h +++ b/src/include/rados/rgw_file.h @@ -221,7 +221,7 @@ int rgw_unlink(struct rgw_fs *rgw_fs, /* read directory content */ -typedef bool (*rgw_readdir_cb)(const char *name, void *arg, uint64_t offset, +typedef int (*rgw_readdir_cb)(const char *name, void *arg, uint64_t offset, struct stat *st, uint32_t mask, uint32_t flags); diff --git a/src/test/librgw_file.cc b/src/test/librgw_file.cc index 328c42e6f075e..8f50ab7ac192a 100644 --- a/src/test/librgw_file.cc +++ b/src/test/librgw_file.cc @@ -73,7 +73,7 @@ TEST(LibRGW, GETATTR_ROOT) { } extern "C" { - static bool r1_cb(const char* name, void *arg, uint64_t offset, + static int r1_cb(const char* name, void *arg, uint64_t offset, struct stat* st, uint32_t st_mask, uint32_t flags) { // don't need arg--it would point to fids1 @@ -137,7 +137,7 @@ TEST(LibRGW, GETATTR_BUCKETS) { } extern "C" { - static bool r2_cb(const char* name, void *arg, uint64_t offset, + static int r2_cb(const char* name, void *arg, uint64_t offset, struct stat* st, uint32_t st_mask, uint32_t flags) { std::vector& obj_vector = *(static_cast*>(arg)); diff --git a/src/test/librgw_file_gp.cc b/src/test/librgw_file_gp.cc index 56b61dce4be8e..4c4cfaa61b11d 100644 --- a/src/test/librgw_file_gp.cc +++ b/src/test/librgw_file_gp.cc @@ -213,7 +213,7 @@ TEST(LibRGW, LOOKUP_BUCKET) { } extern "C" { - static bool r2_cb(const char* name, void *arg, uint64_t offset, + static int r2_cb(const char* name, void *arg, uint64_t offset, struct stat *st, uint32_t st_mask, uint32_t flags) { // don't need arg--it would point to fids diff --git a/src/test/librgw_file_marker.cc b/src/test/librgw_file_marker.cc index 9095fd9bfcf2a..7964102970157 100644 --- a/src/test/librgw_file_marker.cc +++ b/src/test/librgw_file_marker.cc @@ -292,7 +292,7 @@ TEST(LibRGW, MARKER1_SETUP_OBJECTS) } extern "C" { - static bool r2_cb(const char* name, void *arg, uint64_t offset, + static int r2_cb(const char* name, void *arg, uint64_t offset, struct stat* st, uint32_t st_mask, uint32_t flags) { dirent_vec& dvec = diff --git a/src/test/librgw_file_nfsns.cc b/src/test/librgw_file_nfsns.cc index 2ce65519c017f..5fe69d81e4759 100644 --- a/src/test/librgw_file_nfsns.cc +++ b/src/test/librgw_file_nfsns.cc @@ -873,7 +873,7 @@ TEST(LibRGW, RELEASE_DIRS1) { } extern "C" { - static bool r1_cb(const char* name, void *arg, uint64_t offset, + static int r1_cb(const char* name, void *arg, uint64_t offset, struct stat* st, uint32_t st_mask, uint32_t flags) { struct rgw_file_handle* parent_fh @@ -1031,7 +1031,7 @@ TEST(LibRGW, MARKER1_SETUP_OBJECTS) } extern "C" { - static bool r2_cb(const char* name, void *arg, uint64_t offset, + static int r2_cb(const char* name, void *arg, uint64_t offset, struct stat* st, uint32_t st_mask, uint32_t flags) { dirent_vec& dvec = -- 2.39.5