From 041e34807673812419b2aab8ae8fa5009d3f69e1 Mon Sep 17 00:00:00 2001 From: Sergei Trifonov Date: Thu, 24 Mar 2022 15:30:10 +0100 Subject: [PATCH 1/2] cosmetic bugfix --- src/Common/filesystemHelpers.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Common/filesystemHelpers.h b/src/Common/filesystemHelpers.h index a0c761a516f..27041a2f0a8 100644 --- a/src/Common/filesystemHelpers.h +++ b/src/Common/filesystemHelpers.h @@ -35,13 +35,13 @@ enum class BlockDeviceType #if !defined(__linux__) [[noreturn]] #endif -BlockDeviceType getBlockDeviceType([[maybe_unused]] const String & deviceId); +BlockDeviceType getBlockDeviceType([[maybe_unused]] const String & device_id); // Get size of read-ahead in bytes for specified block device #if !defined(__linux__) [[noreturn]] #endif -UInt64 getBlockDeviceReadAheadBytes([[maybe_unused]] const String & deviceId); +UInt64 getBlockDeviceReadAheadBytes([[maybe_unused]] const String & device_id); /// Returns mount point of filesystem where absolute_path (must exist) is located std::filesystem::path getMountPoint(std::filesystem::path absolute_path); From 85f2ed12e113eafe5a1b8d2e489a7920b31a5456 Mon Sep 17 00:00:00 2001 From: Sergei Trifonov Date: Fri, 25 Mar 2022 12:52:50 +0100 Subject: [PATCH 2/2] fix darwin build --- base/base/getAvailableMemoryAmount.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/base/getAvailableMemoryAmount.cpp b/base/base/getAvailableMemoryAmount.cpp index a7b12ef4699..d2f794e8952 100644 --- a/base/base/getAvailableMemoryAmount.cpp +++ b/base/base/getAvailableMemoryAmount.cpp @@ -27,7 +27,7 @@ uint64_t getAvailableMemoryAmountOrZero() unsigned int usermem; size_t len = sizeof(usermem); static int mib[2] = { CTL_HW, HW_USERMEM }; - if (sysctl(mib, 2, &usermem, &len, NULL, 0) == 0 && len == sizeof(usermem)) + if (sysctl(mib, 2, &usermem, &len, nullptr, 0) == 0 && len == sizeof(usermem)) return usermem; else return 0;