api: extend va_deprecate to modern c/c++ and MSVC#730
Open
dvrogozh wants to merge 1 commit intointel:masterfrom
Open
api: extend va_deprecate to modern c/c++ and MSVC#730dvrogozh wants to merge 1 commit intointel:masterfrom
dvrogozh wants to merge 1 commit intointel:masterfrom
Conversation
Since libva was ported to Windows we should extend va_deprecate to work for MSVC where possible. Otherwise there might be confisions on which API is or is not deprecated. We also can use advantages of modern c/c++ standards providing deprecating attributes. Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
evelikov
reviewed
Jul 18, 2023
| #define va_deprecated_enum [[deprecated]] | ||
| #elif __STDC__ && __STDC_VERSION__ >= 202311L | ||
| #define va_deprecated [[deprecated]] | ||
| #define va_deprecated_enum [[deprecated]] |
Contributor
There was a problem hiding this comment.
Don't know how much we care, but this will break Coverity Scan - both within this project and other projects that use libva. See 3921874 for details.
Contributor
Author
There was a problem hiding this comment.
Added notation is a part of C/C++ standard which tools should now or later be capable to understand. Whether Coverity understands above notation as of today - that's a question. I wonder how we can check before the merge? @uartie : do we have a way?
Other than that it's easy to modify PR to expand to nothing for coverity (as it was before).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since libva was ported to Windows we should extend va_deprecate to work for MSVC where possible. Otherwise there might be confisions on which API is or is not deprecated.
We also can use advantages of modern c/c++ standards providing deprecating attributes.