8000 build: Add -Werror=missing-noreturn by hebasto · Pull Request #21667 · bitcoin/bitcoin · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

build: Add -Werror=missing-noreturn #21667

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

Closed
wants to merge 3 commits into from

Conversation

hebasto
Copy link
Member
@hebasto hebasto commented Apr 13, 2021

This PR is a #21633 follow up.

Additionally, it makes --enable-suppress-external-warnings the default configure options, that allows to apply more -W and -Werror options to our own code (e.g., #21613).

@DrahtBot
Copy link
Contributor
DrahtBot commented Apr 13, 2021

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

Copy link
Member
@fanquake fanquake left a comment

Choose a reason for hiding this comment

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

Additionally, it makes --enable-suppress-external-warnings the default configure options,

I'm not sure why this is mentioned as a second line change, as this is the major change here. Also, if the defaults are being changed, shouldn't some of the configure logic be reversed to only apply certain warnings in the now, non-default case? For now, I'm an approach NACK.

It would be great if you could summarize (maybe in a new issue or gist) what the end goals are with some of your current build system changes:

  • Where are you trying to get our build system to?
    • What would you envision our "perfect" build system setup to be?
  • How will/should release builds differ from "regular" builds vs debugging builds vs building in the CI etc.
    • Taking into account system packages vs depends packages
  • What are the expectations for when warnings are "allowed" vs when they should be suppressed?
    • When should they be disabled/tested in configure, vs patch around / pragma'd away?
    • When is it "ok" to turn on something that might be broken in an older compiler etc.
  • Are you expecting us to be building with -Werror by default at some point?
    • This is unlikely to be the case.
  • What are the missing additional checks / warnings that you think would be very valuable to apply to our codebase?

At the moment it seems like a very inconsistent/whack-a-mole type approach is being taken, mostly just to suppress warnings (sometimes at any cost. i.e #20824), but also sometimes disabling checks outright, or patching around them in our own code.

@@ -431,17 +431,18 @@ if test "x$enable_werror" = "xyes"; then
AX_CHECK_COMPILE_FLAG([-Werror=unused-variable],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=unused-variable"],,[[$CXXFLAG_WERROR]])
AX_CHECK_COMPILE_FLAG([-Werror=date-time],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=date-time"],,[[$CXXFLAG_WERROR]])
AX_CHECK_COMPILE_FLAG([-Werror=return-type],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=return-type"],,[[$CXXFLAG_WERROR]])
AX_CHECK_COMPILE_FLAG([-Werror=conditional-uninitialized],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=conditional-uninitialized"],,[[$CXXFLAG_WERROR]])
Copy link
Member

Choose a reason for hiding this comment

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

In ebe68bd. I don't understand why a number of checks are being moved in this commit (no explanation in the commit message). Isn't this reducing the scope of when they are applied? If they work fine now (no warnings), why do they need to be moved inside the scope suppressing external warnings (and only after you've suppressed warnings from leveldb)?

@Sjors
Copy link
Member
Sjors commented Apr 15, 2021

I don't think we should make --enable-suppress-external-warnings the default, but it should be better documented. Someone needs to be motivated to fix things upstream and/or notice problems when we update dependencies.

@DrahtBot
Copy link
Contributor
DrahtBot commented May 3, 2021

🕵️ @achow101 @sipa @practicalswift have been requested to review this pull request as specified in the REVIEWERS file.

@hebasto
Copy link
Member Author
hebasto commented May 24, 2021

@fanquake

Additionally, it makes --enable-suppress-external-warnings the default configure options,

I'm not sure why this is mentioned as a second line change, as this is the major change her

Right. This major change separated into #22041.

This PR is converted to a draft for now.

@hebasto hebasto marked this pull request as draft May 24, 2021 11:22
@hebasto
Copy link
Member Author
hebasto commented May 29, 2021

This PR requires #22041.

So, closing for now.

@hebasto hebasto closed this May 29, 2021
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Aug 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0