-
Notifications
You must be signed in to change notification settings - Fork 125
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
[Actions] [Warnings] Treating warnings as errors in GitHub Actions, fixing many warnings #1393
Merged
pwielders
merged 53 commits into
rdkcentral:master
from
VeithMetro:development/actions-warnings
Aug 16, 2023
Merged
[Actions] [Warnings] Treating warnings as errors in GitHub Actions, fixing many warnings #1393
pwielders
merged 53 commits into
rdkcentral:master
from
VeithMetro:development/actions-warnings
Aug 16, 2023
Conversation
This file contains 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
ISO C++11 requires at least one argument for the "..." in a variadic macro (Warning Reporting macros)
…Thunder into development/actions-warnings
…Thunder into development/actions-warnings
…s members in a C++11 friendly way
…unnecessary \0 character
… through the proxy macros in warning reporting
…nce this one doesnt seem to work
…s the only one that works
…Thunder into development/actions-warnings
pwielders
approved these changes
Aug 16, 2023
bramoosterhuis
pushed a commit
to bramoosterhuis/Thunder
that referenced
this pull request
Apr 26, 2024
…ixing many warnings (rdkcentral#1393) * Treat warnings as errors for the Linux build with cmake * Triggering the action for my branch to check if it works * Treat warnings as errors for C compilation * Enabling all warnings for Windows * Enabling all possible warnings for the Linux build * Changing the build command for Windows, adding treating warnings are errors * Changing the warning level for Windows to level 4 * Looks like we cannot change the warning level with devenv for Windows * Trying a different placement of the warning switch for devenv * Warning settings cannot be changed using devenv, have to do that in project files * Dropping the ISO C++11 related warnings for now ISO C++11 requires at least one argument for the "..." in a variadic macro (Warning Reporting macros) * Not failing on warnings for now to get a full list of warnings * Removing pedantic warnings for now * Range loop construct - making sure the reference is used instead of a copy * Initialization order fix - ProxyPoolTypes order in TraceFactoryType * Changing the branch to checkout to see if warnings are fixed * Checkouting my fork instead of the rdkcentral repo for now * Properly fixing a warning with one of the loops * Fixing a warning with yet another loop * Adding pedantic warnings to actions as the serious ones are fixed * Removing extra semicolons in PUSH_WARNING macro uses * Removing extra semicolons in POP_WARNING macro uses * Adding a missing message to the static_assert in Frame.h * ReceiveFrom function in SocketPort is now inside extern C * Removing an unused variable in SecureSocketPort * Changing binary values to hex to supress warnings * Casting to a void pointer to suppress a warning in TRACE_L1 macro use * Dropping the extern C to avoid namespace issues, and declaring structs members in a C++11 friendly way * Changing VLAs to ALLOCA macro, fixing the wrong array size, removing unnecessary \0 character * Dereferencing an array pointer in sizeof() * Adding pragma to ignore pedantic warnings for macro definitions * Adding a macro disabling pedantic warning to Portability and using it through the proxy macros in warning reporting * Modifying PUSH_WARNING macro to be warning free with pedantic flag enabled * Trying to suppress variadic macros warning instead of pedantic one since this one doesnt seem to work * Trying another way of disabling variadic macros warnings * Adding pragmas to macro use instead of definition to check if it works * Moving the pragmas outside the scope * Using GCC system_header pragma to try to disable the warning * Trying to use only the gcc system header method since seems like it is the only one that works * Including PUSH_WARNING_ARG macro in the system header * Trying to include more macros in system header to make the warning go away * Making TRACE_Lx macros inside gcc system header to suppress warnings * Moving the system header declaration before TRACE_FORMATTING_IMPL macro definition * Minor code formatting changes * Preparing the build on Windows action for merging * Enabling treating warnings as errors for the final test before merging * Preparing the Linux build to be merged * Fixing the size of an array passed to memset
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.
@pwielders I did quite a bit of research on how to disable this specific variadic macro warning coming from
-Wpedantic
, and there is a lot of issues when trying to disable it in GCC (apparently it works better with clang), e.g.PUSH_WARNING
(GCC diagnostic) does not work.I tested many possible solutions, but using
#pragma GCC system_header
(https://gcc.gnu.org/onlinedocs/cpp/System-Headers.html) is the only one which actually worked. It suppresses all but the most critical warnings for the rest of the header file in which it is used (we could also move the macros to the bottom of the header file if we want to suppress as little potential warnings as possible).