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

api: extend va_deprecate to modern c/c++ and MSVC #730

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dvrogozh
Copy link
Contributor

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.

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 <[email protected]>
#define va_deprecated_enum [[deprecated]]
#elif __STDC__ && __STDC_VERSION__ >= 202311L
#define va_deprecated [[deprecated]]
#define va_deprecated_enum [[deprecated]]
Copy link
Contributor

Choose a reason for hiding this comment

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

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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).

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

Successfully merging this pull request may close these issues.

2 participants