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
clang's variadic macro warnings: only for clang #3132
clang's variadic macro warnings: only for clang #3132
Conversation
Thanks. Could you do it in a little bit different way, so that the flags get not set globally. Paste this # Calling Qt's qCWarning(category, ...) with no params for "..." is a GNU
# extension (C++11 §16.3/4 forbids them). Silence clang's warnings.
target_compile_options("${csync_NAME}" PUBLIC
$<$<CXX_COMPILER_ID:Clang>:-Wno-gnu-zero-variadic-macro-arguments>
$<$<C_COMPILER_ID:Clang>:-Wno-gnu-zero-variadic-macro-arguments>) right below Then remove # Calling Qt's qCWarning(category, ...) with no params for "..." is a GNU
# extension (C++11 §16.3/4 forbids them). Silence clang's warnings.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-gnu-zero-variadic-macro-arguments")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-gnu-zero-variadic-macro-arguments") entirely from Additionally it would be great if you can signoff your commit to please the DCO bot. |
# extension (C++11 §16.3/4 forbids them). Silence clang's warnings. | ||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-gnu-zero-variadic-macro-arguments") | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-gnu-zero-variadic-macro-arguments") | ||
endif() |
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.
See my comment
hello @FlexW : thanks for your inputs. |
@yopito Yes, I can do it. But thinking a bit more about this, I'm not sure anymore if that is the best way to solve the problem. I have the feeling that setting this warning should be a private property and not automatically should change the flags on all targets that link to the csync target. However, if making it private, we need to set it on each target separate. @mgallien What do you think? |
By the way, would that be more appropriate to do that in master and backport? So far the project followed a backport strategy not a forward port one. |
Of course that would be better :) Thanks for hinting it. |
5295182
to
c918359
Compare
OK, I've reworked this PR against master branch. |
c918359
to
687a9cf
Compare
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.
Thank you. I'll will merge that now as it is.
/rebase |
following settings of cmake/modules/Warnings.cmake Signed-off-by: yopito <pierre.bourgin@free.fr>
687a9cf
to
14d61c5
Compare
AppImage file: Nextcloud-PR-3132-14d61c507157cc0c45201f934255c6dde03f64fc-x86_64.AppImage |
following settings of cmake/modules/Warnings.cmake
once applied, no more zillon of warning on building as below:
Edit: appeared on 3.1.3 or 3.2 release