-
Notifications
You must be signed in to change notification settings - Fork 211
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
Revert "Put AVIF_NODISCARD after AVIF_API" again #2298
Revert "Put AVIF_NODISCARD after AVIF_API" again #2298
Conversation
This reverts commit da268fb. I tested this with Visual Studio 2022 Version 17.10.3. It does not work. I must have made a mistake when I tested this with Visual Studio last time. I found two webpages that support my test results: https://stackoverflow.com/questions/67502217/warning-c5240-nodiscard-attribute-is-ignored-in-this-syntactic-position microsoft/STL#1702 I think this issue is settled.
Here is my latest test of a standalone file. The compiler version:
The bad code:
The good code:
|
I forgot to request code review. PTAL. Thanks! |
How come the CI does not catch it? |
To catch the compilation error (either MSVC or clang-cl), we need a shared library build ( There are some two build errors in our shared library build. One is easy to fix (two gtest-based tests need to link with the Finally, we cannot run the tests in a shared library build on Windows because the tests and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
This reverts commit da268fb.
I tested this with Visual Studio 2022 Version 17.10.3. It does not work. I must have made a mistake when I tested this with Visual Studio last time.
I found two webpages that support my test results:
https://stackoverflow.com/questions/67502217/warning-c5240-nodiscard-attribute-is-ignored-in-this-syntactic-position microsoft/STL#1702
I think this issue is settled.