Skip to content

Commit b50d127

Browse files
committed
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`.
1 parent d73245a commit b50d127

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

build_msvc/fuzz/fuzz.vcxproj

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,6 @@
8080
<Project>{18430fef-6b61-4c53-b396-718e02850f1b}</Project>
8181
</ProjectReference>
8282
</ItemGroup>
83-
<ItemDefinitionGroup>
84-
<ClCompile>
85-
<DisableSpecificWarnings>4018;4244;4267;4334;4715;4805</DisableSpecificWarnings>
86-
</ClCompile>
87-
</ItemDefinitionGroup>
8883
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
8984
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
9085
<Import Project="..\common.vcxproj" />

src/test/fuzz/poolresource.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ class PoolResourceFuzzer
6363
{
6464
if (m_total_allocated > 0x1000000) return;
6565
size_t alignment_bits = m_provider.ConsumeIntegralInRange<size_t>(0, 7);
66-
size_t alignment = 1 << alignment_bits;
66+
size_t alignment = size_t{1} << alignment_bits;
6767
size_t size_bits = m_provider.ConsumeIntegralInRange<size_t>(0, 16 - alignment_bits);
68-
size_t size = m_provider.ConsumeIntegralInRange<size_t>(1U << size_bits, (1U << (size_bits + 1)) - 1U) << alignment_bits;
68+
size_t size = m_provider.ConsumeIntegralInRange<size_t>(size_t{1} << size_bits, (size_t{1} << (size_bits + 1)) - 1U) << alignment_bits;
6969
Allocate(size, alignment);
7070
}
7171

0 commit comments

Comments
 (0)