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

[Actions] [Warnings] Treating warnings as errors in GitHub Actions, fixing many warnings #1393

Merged
merged 53 commits into from
Aug 16, 2023

Conversation

VeithMetro
Copy link
Contributor

@VeithMetro VeithMetro commented Aug 10, 2023

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

VeithMetro and others added 30 commits August 1, 2023 09:01
ISO C++11 requires at least one argument for the "..." in a variadic macro (Warning Reporting macros)
VeithMetro and others added 21 commits August 8, 2023 15:29
… through the proxy macros in warning reporting
@pwielders pwielders merged commit 68650fa into rdkcentral:master Aug 16, 2023
10 checks passed
@VeithMetro VeithMetro deleted the development/actions-warnings branch August 21, 2023 06:57
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants