diff options
author | Andreas Rogge <andreas.rogge@bareos.com> | 2022-10-21 15:23:44 +0300 |
---|---|---|
committer | Andreas Rogge <andreas.rogge@bareos.com> | 2022-11-03 12:09:57 +0300 |
commit | bb652adb21b42335a7ff27f6df93456a7cf41fd2 (patch) | |
tree | 742665a2c7122b10efcbd9785c4a9067343c5049 | |
parent | 9405b6e497b74f2b20022b5a7c62af85a553ec07 (diff) |
don't publish compiler settings through droplet
and fix some issues in droplet_device
-rw-r--r-- | core/src/droplet/libdroplet/CMakeLists.txt | 5 | ||||
-rw-r--r-- | core/src/stored/backends/chunked_device.cc | 6 | ||||
-rw-r--r-- | core/src/stored/backends/droplet_device.cc | 24 |
3 files changed, 18 insertions, 17 deletions
diff --git a/core/src/droplet/libdroplet/CMakeLists.txt b/core/src/droplet/libdroplet/CMakeLists.txt index 3688d03de..ff0ac726b 100644 --- a/core/src/droplet/libdroplet/CMakeLists.txt +++ b/core/src/droplet/libdroplet/CMakeLists.txt @@ -98,9 +98,8 @@ add_library( src/backend/posix/replyparser.c ) -# openssl 3.0 -target_compile_options(droplet PUBLIC -Wno-deprecated-declarations -Wno-extra) -target_link_options(droplet PUBLIC -Wno-extra) +target_compile_options(droplet PRIVATE -Wno-deprecated-declarations -Wno-extra) +target_link_options(droplet PRIVATE -Wno-deprecated-declarations -Wno-extra) target_include_directories( droplet PUBLIC include ${LIBXML2_INCLUDE_DIR} ${JSONC_INCLUDE_DIRS} diff --git a/core/src/stored/backends/chunked_device.cc b/core/src/stored/backends/chunked_device.cc index f073e9fb7..58421a862 100644 --- a/core/src/stored/backends/chunked_device.cc +++ b/core/src/stored/backends/chunked_device.cc @@ -573,7 +573,7 @@ bool ChunkedDevice::ReadChunk() * -1: failure * 0: success */ -int ChunkedDevice::SetupChunk(const char* pathname, int flags, int mode) +int ChunkedDevice::SetupChunk(const char*, int flags, int) { int retval = -1; /* @@ -657,7 +657,7 @@ int ChunkedDevice::SetupChunk(const char* pathname, int flags, int mode) } // Read a chunked volume. -ssize_t ChunkedDevice::ReadChunked(int fd, void* buffer, size_t count) +ssize_t ChunkedDevice::ReadChunked(int, void* buffer, size_t count) { ssize_t retval = 0; @@ -791,7 +791,7 @@ bail_out: } // Write a chunked volume. -ssize_t ChunkedDevice::WriteChunked(int fd, const void* buffer, size_t count) +ssize_t ChunkedDevice::WriteChunked(int, const void* buffer, size_t count) { ssize_t retval = 0; diff --git a/core/src/stored/backends/droplet_device.cc b/core/src/stored/backends/droplet_device.cc index f5fcf540b..6bf1923a0 100644 --- a/core/src/stored/backends/droplet_device.cc +++ b/core/src/stored/backends/droplet_device.cc @@ -85,13 +85,13 @@ static device_option device_options[] {"ioslots=", argument_ioslots, 8}, {"retries=", argument_retries, 8}, {"mmap", argument_mmap, 4}, - {NULL, argument_none}}; + {NULL, argument_none, 0}}; static int droplet_reference_count = 0; static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; // Generic log function that glues libdroplet with BAREOS. -static void DropletDeviceLogfunc(dpl_ctx_t* ctx, +static void DropletDeviceLogfunc(dpl_ctx_t*, dpl_log_level_t level, const char* message) { @@ -122,6 +122,7 @@ static inline int DropletErrnoToSystemErrno(dpl_status_t status) break; case DPL_ETIMEOUT: errno = ETIMEDOUT; + break; case DPL_ENOMEM: errno = ENOMEM; break; @@ -160,8 +161,8 @@ static inline int DropletErrnoToSystemErrno(dpl_status_t status) // Callback for getting the total size of a chunked volume. static dpl_status_t chunked_volume_size_callback(dpl_sysmd_t* sysmd, - dpl_ctx_t* ctx, - const char* chunkpath, + dpl_ctx_t*, + const char*, void* data) { dpl_status_t status = DPL_SUCCESS; @@ -178,10 +179,10 @@ static dpl_status_t chunked_volume_size_callback(dpl_sysmd_t* sysmd, * @return DPL_SUCCESS on success, on error: a dpl_status_t value that * represents the error. */ -static dpl_status_t chunked_volume_truncate_callback(dpl_sysmd_t* sysmd, +static dpl_status_t chunked_volume_truncate_callback(dpl_sysmd_t*, dpl_ctx_t* ctx, const char* chunkpath, - void* data) + void*) { dpl_status_t status = DPL_SUCCESS; @@ -642,6 +643,7 @@ bool DropletDevice::ReadRemoteChunk(chunk_io_request* request) dev_errno = EIO; Bmicrosleep(INFLIGT_RETRY_TIME, 0); ++tries; + break; default: Mmsg2(errmsg, _("Failed to read %s using dpl_fget(): ERR=%s.\n"), chunk_name.c_str(), dpl_status_str(status)); @@ -666,7 +668,7 @@ bail_out: * Internal method for truncating a chunked volume on the remote backing * store. */ -bool DropletDevice::TruncateRemoteVolume(DeviceControlRecord* dcr) +bool DropletDevice::TruncateRemoteVolume(DeviceControlRecord*) { PoolMem chunk_dir(PM_FNAME); @@ -685,7 +687,7 @@ bool DropletDevice::TruncateRemoteVolume(DeviceControlRecord* dcr) } -bool DropletDevice::d_flush(DeviceControlRecord* dcr) +bool DropletDevice::d_flush(DeviceControlRecord*) { return WaitUntilChunksWritten(); }; @@ -927,9 +929,9 @@ ssize_t DropletDevice::d_write(int fd, const void* buffer, size_t count) return WriteChunked(fd, buffer, count); } -int DropletDevice::d_close(int fd) { return CloseChunk(); } +int DropletDevice::d_close(int) { return CloseChunk(); } -int DropletDevice::d_ioctl(int fd, ioctl_req_t request, char* op) { return -1; } +int DropletDevice::d_ioctl(int, ioctl_req_t, char*) { return -1; } /** * Open a directory on the backing store and find out size information for a @@ -967,7 +969,7 @@ bail_out: return volumesize; } -boffset_t DropletDevice::d_lseek(DeviceControlRecord* dcr, +boffset_t DropletDevice::d_lseek(DeviceControlRecord*, boffset_t offset, int whence) { |