mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-08 10:31:50 -05:00
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`.
This commit is contained in:
parent
d73245abc7
commit
b50d127a77
2 changed files with 2 additions and 7 deletions
|
@ -80,11 +80,6 @@
|
||||||
<Project>{18430fef-6b61-4c53-b396-718e02850f1b}</Project>
|
<Project>{18430fef-6b61-4c53-b396-718e02850f1b}</Project>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemDefinitionGroup>
|
|
||||||
<ClCompile>
|
|
||||||
<DisableSpecificWarnings>4018;4244;4267;4334;4715;4805</DisableSpecificWarnings>
|
|
||||||
</ClCompile>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<Import Project="..\common.vcxproj" />
|
<Import Project="..\common.vcxproj" />
|
||||||
|
|
|
@ -63,9 +63,9 @@ public:
|
||||||
{
|
{
|
||||||
if (m_total_allocated > 0x1000000) return;
|
if (m_total_allocated > 0x1000000) return;
|
||||||
size_t alignment_bits = m_provider.ConsumeIntegralInRange<size_t>(0, 7);
|
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_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);
|
Allocate(size, alignment);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue