diff --git a/src/core/lib/iomgr/error.cc b/src/core/lib/iomgr/error.cc index 8282e153f96..da33bec91e9 100644 --- a/src/core/lib/iomgr/error.cc +++ b/src/core/lib/iomgr/error.cc @@ -322,8 +322,8 @@ static uint8_t get_placement(grpc_error_handle* err, size_t size) { GPR_ASSERT(*err); uint8_t slots = static_cast(size / sizeof(intptr_t)); if ((*err)->arena_size + slots > (*err)->arena_capacity) { - (*err)->arena_capacity = static_cast( - std::min(UINT8_MAX - 1, (3 * (*err)->arena_capacity / 2))); + (*err)->arena_capacity = static_cast(std::min( + size_t(UINT8_MAX - 1), size_t(3 * (*err)->arena_capacity / 2))); if ((*err)->arena_size + slots > (*err)->arena_capacity) { return UINT8_MAX; }