-
Notifications
You must be signed in to change notification settings - Fork 208
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 -Wextra-semi-stmt #2063
Fix -Wextra-semi-stmt #2063
Conversation
…sary ';' to silence this warning [-Werror,-Wextra-semi-stmt]
…sary ';' to silence this warning [-Werror,-Wextra-semi-stmt]
This option could be added to CMakeLists.txt as well. |
Like this? diff --git a/CMakeLists.txt b/CMakeLists.txt
index 30644e8..ae1459b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -254,5 +254,5 @@ include(CheckCCompilerFlag)
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
message(STATUS "libavif: Enabling warnings for Clang")
- target_compile_options(avif_obj PUBLIC $<BUILD_INTERFACE:-Wall -Wextra -Wshorten-64-to-32>)
+ target_compile_options(avif_obj PUBLIC $<BUILD_INTERFACE:-Wall -Wextra -Wextra-semi-stmt -Wshorten-64-to-32>)
elseif(CMAKE_C_COMPILER_ID MATCHES "GNU")
message(STATUS "libavif: Enabling warnings for GCC") It seems to be present in clang >= 8 and your cmake'ry doesn't seem to check versions. |
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.
We can merge this pull request first. Either way is fine. Thank you for your contribution.
OK, merge as is, then. Thanks. |
Sorry about that. I figured there would be some extra work to check versions. We'll follow up with something. Thanks for the patch. |
empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Werror,-Wextra-semi-stmt]
We noticed this in our libsdl fork. Applies to v1.0.x branch as is, as well.