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 AddOperator() in sato test #2329

Merged
merged 1 commit into from
Jul 26, 2024
Merged

Conversation

y-guyon
Copy link
Collaborator

@y-guyon y-guyon commented Jul 26, 2024

Fixes #2322.

@vrabaud vrabaud added this to the v1.1.1 milestone Jul 26, 2024
@y-guyon y-guyon merged commit 71af92f into AOMediaCodec:main Jul 26, 2024
15 checks passed
@y-guyon y-guyon deleted the sato_cast branch July 26, 2024 09:10
tests/gtest/avifsampletransformtest.cc Show resolved Hide resolved
@@ -28,7 +28,7 @@ class AvifExpression : public avifSampleTransformExpression {
token.type = AVIF_SAMPLE_TRANSFORM_INPUT_IMAGE_ITEM_INDEX;
token.inputImageItemIndex = inputImageItemIndex;
}
void AddOperator(uint8_t op) {
void AddOperator(avifSampleTransformTokenType op) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thank you for the pull request. I am worried that this did not fix the compiler warning. (Compiler warnings are not enabled on tests yet. Sorry about the confusion.) I will test this using a draft pull request of mine later (#2318).

The warning we need to fix is:

warning C4244: 'argument': conversion from 'const avifSampleTransformTokenType' to 'uint8_t', possible loss of data

Since token.type is a uint8_t, the assignment token.type = op; is now a conversion from 'const avifSampleTransformTokenType' to 'uint8_t', so I am worried that MSVC will warn about the assignment.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sorry, it was an oversight on my end. Fixed in #2331.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants