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 compilation with clang 14 #886

Conversation

DimitryAndric
Copy link
Contributor

Clang >= 14 warns that mixing declarations and code is incompatible with standards before C99, even if you compile with -std=c99 or -std=gnu99.

Add -Wno-declaration-after-statement if it is supported, to silence the warning.

Clang >= 14 warns that mixing declarations and code is incompatible with
standards before C99, even if you compile with -std=c99 or -std=gnu99.

Add `-Wno-declaration-after-statement` if it is supported, to silence
the warning.
Copy link
Collaborator

@wantehchang wantehchang left a comment

Choose a reason for hiding this comment

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

LGTM. Joe Drago and I discussed our use of -Weverything with clang. We will replace it with -Wall -Wextra plus additional compiler warnings.

@wantehchang wantehchang merged commit c18228f into AOMediaCodec:master Mar 17, 2022
freebsd-git pushed a commit to freebsd/freebsd-ports that referenced this pull request Mar 19, 2022
Clang >= 14 warns that mixing declarations and code is incompatible with
standards before C99, even if you compile with -std=c99 or -std=gnu99.

Add `-Wno-declaration-after-statement` if it is supported, to silence
the warning.

PR:		262634
Approved by:	jbeich (maintainer)
Obtained from:	AOMediaCodec/libavif#886
MFH:		2022Q1
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.

None yet

2 participants