diff options
-rw-r--r-- | .clang-tidy | 2 | ||||
-rw-r--r-- | src/buildtool/common/remote/retry_config.hpp | 2 | ||||
-rw-r--r-- | src/buildtool/execution_api/common/bytestream_utils.hpp | 2 | ||||
-rw-r--r-- | src/buildtool/execution_api/common/message_limits.hpp | 2 | ||||
-rw-r--r-- | src/buildtool/execution_api/execution_service/capabilities_server.cpp | 2 | ||||
-rw-r--r-- | src/buildtool/file_system/file_system_manager.hpp | 2 | ||||
-rw-r--r-- | test/buildtool/storage/large_object_cas.test.cpp | 2 |
7 files changed, 7 insertions, 7 deletions
diff --git a/.clang-tidy b/.clang-tidy index 7fa5f8a6..67f0b1b1 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -2,7 +2,7 @@ FormatStyle: Google Checks: >- *,-abseil-*,-altera-*,-android-*,-boost-*,-cert-*,-darwin-*,-fuchsia-*,-linuxkernel-*,-llvm-*,-llvmlibc-*,-mpi-*,-objc-*,-zircon-* WarningsAsErrors: >- - bugprone-*,-bugprone-easily-swappable-parameters,-bugprone-unchecked-optional-access,-bugprone-unhandled-exception-at-new,-bugprone-empty-catch,-bugprone-implicit-widening-of-multiplication-result,-bugprone-exception-escape, + bugprone-*,-bugprone-easily-swappable-parameters,-bugprone-unchecked-optional-access,-bugprone-unhandled-exception-at-new,-bugprone-empty-catch,-bugprone-exception-escape, clang-analyzer-*,-clang-analyzer-cplusplus.NewDeleteLeaks,-clang-analyzer-cplusplus.StringChecker, clang-diagnostic-*,-clang-diagnostic-unused-command-line-argument, hicpp-*, diff --git a/src/buildtool/common/remote/retry_config.hpp b/src/buildtool/common/remote/retry_config.hpp index 91c8b75e..ed4b0108 100644 --- a/src/buildtool/common/remote/retry_config.hpp +++ b/src/buildtool/common/remote/retry_config.hpp @@ -78,7 +78,7 @@ class RetryConfig final { static std::mutex mutex; static std::mt19937 rng{std::random_device{}()}; try { - dist_type dist{0, backoff * 3}; + dist_type dist{0, 3UL * backoff}; std::unique_lock lock(mutex); return dist(rng); } catch (...) { diff --git a/src/buildtool/execution_api/common/bytestream_utils.hpp b/src/buildtool/execution_api/common/bytestream_utils.hpp index 672ae017..232c6728 100644 --- a/src/buildtool/execution_api/common/bytestream_utils.hpp +++ b/src/buildtool/execution_api/common/bytestream_utils.hpp @@ -31,7 +31,7 @@ class ByteStreamUtils final { public: // Chunk size for uploads (default size used by BuildBarn) - static constexpr std::size_t kChunkSize = 64 * 1024; + static constexpr std::size_t kChunkSize = 64UL * 1024; /// \brief Create a read request for the bytestream service to be /// transferred over the net. Handles serialization/deserialization on its diff --git a/src/buildtool/execution_api/common/message_limits.hpp b/src/buildtool/execution_api/common/message_limits.hpp index 47b3b8b1..5ad1818a 100644 --- a/src/buildtool/execution_api/common/message_limits.hpp +++ b/src/buildtool/execution_api/common/message_limits.hpp @@ -17,6 +17,6 @@ #include <grpc/grpc.h> // Max size for batch transfers -static constexpr std::size_t kMaxBatchTransferSize = 3 * 1024 * 1024; +static constexpr std::size_t kMaxBatchTransferSize = 3UL * 1024 * 1024; static_assert(kMaxBatchTransferSize < GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH, "Max batch transfer size too large."); diff --git a/src/buildtool/execution_api/execution_service/capabilities_server.cpp b/src/buildtool/execution_api/execution_service/capabilities_server.cpp index 0f3f7855..dc1532e1 100644 --- a/src/buildtool/execution_api/execution_service/capabilities_server.cpp +++ b/src/buildtool/execution_api/execution_service/capabilities_server.cpp @@ -36,7 +36,7 @@ auto CapabilitiesServiceImpl::GetCapabilities( cache.add_digest_functions( ::bazel_re::DigestFunction_Value::DigestFunction_Value_SHA256); cache.mutable_action_cache_update_capabilities()->set_update_enabled(false); - static constexpr std::size_t kMaxBatchTransferSize = 1024 * 1024; + static constexpr std::size_t kMaxBatchTransferSize = 1024UL * 1024; cache.set_max_batch_total_size_bytes(kMaxBatchTransferSize); static_assert(kMaxBatchTransferSize < GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH, "Max batch transfer size too large."); diff --git a/src/buildtool/file_system/file_system_manager.hpp b/src/buildtool/file_system/file_system_manager.hpp index d506f4b9..39dd3cf7 100644 --- a/src/buildtool/file_system/file_system_manager.hpp +++ b/src/buildtool/file_system/file_system_manager.hpp @@ -1185,7 +1185,7 @@ class FileSystemManager { /// Non-zero return values indicate errors, which can be decoded using /// \ref ErrorToString. class LowLevel { - static constexpr std::size_t kDefaultChunkSize = 1024 * 32; + static constexpr std::size_t kDefaultChunkSize = 1024UL * 32; static constexpr int kWriteFlags = O_WRONLY | O_CREAT | O_TRUNC; // NOLINT static constexpr int kWritePerms = // 644 diff --git a/test/buildtool/storage/large_object_cas.test.cpp b/test/buildtool/storage/large_object_cas.test.cpp index e0e3c816..a7dff9a7 100644 --- a/test/buildtool/storage/large_object_cas.test.cpp +++ b/test/buildtool/storage/large_object_cas.test.cpp @@ -46,7 +46,7 @@ template <bool IsExecutable> class Blob final { public: static constexpr auto kLargeId = std::string_view("bl_8Mb"); - static constexpr auto kLargeSize = std::uintmax_t(8 * 1024 * 1024); + static constexpr auto kLargeSize = std::uintmax_t(8UL * 1024 * 1024); static constexpr auto kSmallId = std::string_view("bl_1kB"); static constexpr auto kSmallSize = std::uintmax_t(1024); |