diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2024-05-01 23:09:13 +0100 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2024-05-02 00:16:33 +0100 |
commit | b50d127a7710d790c2ba4a08f01b832c2a0b1203 (patch) | |
tree | 72ed57d81d0f6e22a01d589922a538c2e94098cf /src/test | |
parent | d73245abc70346a0e8805d50a1f395706084294c (diff) | |
download | bitcoin-b50d127a7710d790c2ba4a08f01b832c2a0b1203.tar.xz |
refactor: Make 64-bit shift explicit
This change fixes MSVC level-3 warning C4334.
See: https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-3-c4334
All `DisableSpecificWarnings` dropped from `fuzz.vcxproj` as all
remained are inherited from `common.init.vcxproj`.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/fuzz/poolresource.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/fuzz/poolresource.cpp b/src/test/fuzz/poolresource.cpp index ce64ef6472..f764d9f8db 100644 --- a/src/test/fuzz/poolresource.cpp +++ b/src/test/fuzz/poolresource.cpp @@ -63,9 +63,9 @@ public: { if (m_total_allocated > 0x1000000) return; size_t alignment_bits = m_provider.ConsumeIntegralInRange<size_t>(0, 7); - size_t alignment = 1 << alignment_bits; + size_t alignment = size_t{1} << alignment_bits; size_t size_bits = m_provider.ConsumeIntegralInRange<size_t>(0, 16 - alignment_bits); - size_t size = m_provider.ConsumeIntegralInRange<size_t>(1U << size_bits, (1U << (size_bits + 1)) - 1U) << alignment_bits; + size_t size = m_provider.ConsumeIntegralInRange<size_t>(size_t{1} << size_bits, (size_t{1} << (size_bits + 1)) - 1U) << alignment_bits; Allocate(size, alignment); } |