Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compiler warning #1312

Merged

Conversation

reunanen
Copy link
Contributor

  • The beef of the PR: fix a compiler warning
  • ... but while at it, also assert that a value being converted to unsigned int is not negative

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Nov 10, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

…unsigned int', possible loss of data

Solution: add explicit typecasting

Signed-off-by: Juha Reunanen <juha.reunanen@tomaattinen.com>
Copy link
Member

@cary-ilm cary-ilm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix. One small note above about the assert.

src/lib/OpenEXR/ImfInputFile.cpp Outdated Show resolved Hide resolved
Copy link
Member

@cary-ilm cary-ilm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cary-ilm cary-ilm merged commit 7aa8489 into AcademySoftwareFoundation:main Nov 12, 2022
@reunanen reunanen deleted the fix-compiler-warning branch November 12, 2022 18:31
cary-ilm pushed a commit to cary-ilm/openexr that referenced this pull request Mar 3, 2023
…unsigned int', possible loss of data (AcademySoftwareFoundation#1312)

Solution: add explicit typecasting

Signed-off-by: Juha Reunanen <juha.reunanen@tomaattinen.com>

Signed-off-by: Juha Reunanen <juha.reunanen@tomaattinen.com>
cary-ilm pushed a commit that referenced this pull request Mar 5, 2023
…unsigned int', possible loss of data (#1312)

Solution: add explicit typecasting

Signed-off-by: Juha Reunanen <juha.reunanen@tomaattinen.com>

Signed-off-by: Juha Reunanen <juha.reunanen@tomaattinen.com>
@cary-ilm cary-ilm added the v3.1.6 label Jul 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants