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: Add 'werror=true' to enable -Werror #14

Closed
wants to merge 5 commits into from
Closed

Conversation

CohenArthur
Copy link
Member

No description provided.

@CohenArthur
Copy link
Member Author

CohenArthur commented Oct 16, 2020

linenoise currently does not compile with clang, -Werror and -Wpedantic at the same time. We need to use ks0n/linenoise, at least while this PR is not merged

@CohenArthur
Copy link
Member Author

Wait for #15 to be merged

Copy link
Contributor

@n1tram1 n1tram1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the charstream stuff is not so useful anymore as we have the charstream (I am a bit late)

/**
* Mark argument as `unused`, for example when developing unimplemented functions
*/
#define UNUSED(__ARG) __attribute__((__unused__)) __ARG
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need an __ARG ? ( just expand UNUSED -> attribute((unused)) )

#define UNUSED(__ARG) __attribute__((__unused__)) __ARG

/**
* Create a unique phantom member to a struct to avoid empty structs.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need to avoid empty struct ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ISO C does not allow empty structs

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ISO C always doesn't have __FUNCTION__ do we really want ISO C ?

@@ -1,8 +1,10 @@
project('ubsh', 'c',
default_options: [
'warning_level=3',
'werror=true',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a big fan of Werror, I like to see the difference between actual errors and warnings

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fair. I don't really mind, not using Werror also makes for faster development. I'm just against warnings

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm also not a fan of Werror. I've seen too many project which did not compile because of an update of GCC bringing a new warning and the project used Werror.

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.

3 participants