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
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/gtest/avifsampletransformtest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
wantehchang marked this conversation as resolved.
Show resolved Hide resolved
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.

avifSampleTransformToken& token = AddToken();
token.type = op;
}
Expand Down
Loading