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

meson: migrate -Werror into meson's werror option #35

Closed
wants to merge 2 commits into from

Conversation

lumag
Copy link
Collaborator

@lumag lumag commented Oct 2, 2023

Follow Meson recomendations and use --werror option instead of hardcoding -Werror.

lumag added 2 commits October 2, 2023 17:36
Follow Meson recomendations and use --werror option instead of
hardcoding -Werror.

Signed-off-by: Dmitry Baryshkov <[email protected]>
Silence Clang warning by removing unused '0' from struct initialisation.

Signed-off-by: Dmitry Baryshkov <[email protected]>
@superna9999
Copy link
Member

@lumag you should add it to the default_options array instead:

diff --git a/meson.build b/meson.build
index 0392b0e..04228f0 100644
--- a/meson.build
+++ b/meson.build
@@ -7,6 +7,7 @@ project('cdba',
        default_options: [
             'warning_level=2', # sets -Wextra
             'buildtype=release',
+            'werror=true',
         ])
 
 # Set advanced compiler flags
@@ -26,8 +27,7 @@ compiler_cflags = ['-Wno-unused-parameter',
 
 # TODO add clang specific options
 if compiler.get_id() == 'gcc'
-       compiler_cflags += ['-Werror',  # Only set it on GCC
-                           '-Wformat-signedness',
+       compiler_cflags += ['-Wformat-signedness',
                            '-Wduplicated-cond',
                            '-Wduplicated-branches',
                            '-Wvla-larger-than=1',

@lumag
Copy link
Collaborator Author

lumag commented Oct 23, 2023

@lumag you should add it to the default_options array instead:

No, I don't want to have that in defaults. Let's keep it for CI only (as @calebccff did in #37 )

@superna9999
Copy link
Member

Close in favor of #37

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