Address compiler warnings #10
Some checks failed
BlockStorage/repertory_osx/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head There was a failure building this commit

This commit is contained in:
2023-10-30 13:31:52 -05:00
parent e7413fb741
commit 639d14452b
10 changed files with 1129 additions and 631 deletions

View File

@ -601,11 +601,11 @@ auto remote_server::fuse_read(const char *path, char *buffer,
const remote::file_handle &handle)
-> packet::error_type {
const auto file_path = construct_path(path);
auto &b = *reinterpret_cast<data_buffer *>(buffer);
auto &data = *reinterpret_cast<data_buffer *>(buffer);
auto res = has_open_info(static_cast<native_handle>(handle), EBADF);
if (res == 0) {
b.resize(read_size);
res = pread64(static_cast<native_handle>(handle), &b[0], read_size,
data.resize(read_size);
res = pread64(static_cast<native_handle>(handle), data.data(), read_size,
static_cast<off_t>(read_offset));
}
@ -630,7 +630,7 @@ auto remote_server::fuse_rename(const char *from, const char *to)
auto remote_server::fuse_readdir(const char *path,
const remote::file_offset &offset,
const remote::file_handle &handle,
std::string &itemPath) -> packet::error_type {
std::string &item_path) -> packet::error_type {
const auto file_path = construct_path(path);
auto res = 0;
if (offset > std::numeric_limits<std::size_t>::max()) {
@ -639,7 +639,7 @@ auto remote_server::fuse_readdir(const char *path,
} else {
auto *iterator = reinterpret_cast<directory_iterator *>(handle);
if (iterator) {
res = iterator->get(static_cast<std::size_t>(offset), itemPath);
res = iterator->get(static_cast<std::size_t>(offset), item_path);
} else {
res = -1;
errno = EFAULT;