Skip to content

Commit

Permalink
Fix check warning
Browse files Browse the repository at this point in the history
  • Loading branch information
walbourn committed Aug 23, 2024
1 parent 283d260 commit 46a36be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Auxiliary/DirectXTexEXR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ HRESULT DirectX::SaveToEXRFile(const Image& image, const wchar_t* szFile)
{
const uint64_t bytes = image.width * image.height;

if (bytes > UINT32_MAX)
if (bytes > static_cast<uint64_t>(UINT32_MAX))

Check warning on line 547 in Auxiliary/DirectXTexEXR.cpp

View workflow job for this annotation

GitHub Actions / build (windows-2022, x86-Debug-VCPKG, amd64_x86)

Conversion rules for arithmetic operations in the comparison at D:\a\DirectXTex\DirectXTex\Auxiliary\DirectXTexEXR.cpp(545) mean that one branch cannot be executed. Cast '<unknown>' to 'ULONG64' (or similar type of 8 bytes).
{
return /* HRESULT_FROM_WIN32(ERROR_ARITHMETIC_OVERFLOW) */ static_cast<HRESULT>(0x80070216L);
}
Expand Down

0 comments on commit 46a36be

Please sign in to comment.