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

fuzz: Avoid -Wreturn-type warnings #21364

Merged
merged 1 commit into from Mar 5, 2021

Conversation

practicalswift
Copy link
Contributor

Avoid -Wreturn-type warnings.

Closes #21355.

Copy link
Member

@maflcko maflcko left a comment

Choose a reason for hiding this comment

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

cr ACK 3f36468

seems fine to do to, if this fixes a warning

@@ -10,6 +10,7 @@
#include <attributes.h>
#include <chainparamsbase.h>
#include <coins.h>
#include <compat.h>
Copy link
Member

Choose a reason for hiding this comment

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

nit: I am not really a fan of turning this into a "include all headers that exist" file. This could be a separate module, but as a start, what about moving the implementation details to the cpp file at least?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree, but note that compat.h was already transitively included via at least four other already included files (net.h, netaddress.h, netbase.h and util/time.h).

Thus the explicit inclusion doesn't change anything in practice from a technical perspective: it only makes it clear that we depend on compat.h :)

Explicit is better than implicit as we all know by now :)

@DrahtBot DrahtBot added the Tests label Mar 4, 2021
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.

ACK 3f36468 - thanks for cleaning this up.

@fanquake fanquake merged commit da8c7ed into bitcoin:master Mar 5, 2021
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Mar 5, 2021
3f36468 fuzz: Avoid -Wreturn-type warnings (practicalswift)

Pull request description:

  Avoid `-Wreturn-type` warnings.

  Closes bitcoin#21355.

ACKs for top commit:
  MarcoFalke:
    cr ACK 3f36468
  fanquake:
    ACK 3f36468 - thanks for cleaning this up.

Tree-SHA512: 6fa2640a26e64d2bea60e016ad14b5c434137fedc0b3bf2ac244f02f9b1cd303d1ebac4ac4e6791534560f8311c4cbe9395c2ce94d7ec022d3b192f1ea070809
@practicalswift practicalswift deleted the –Wreturn-type branch April 10, 2021 19:46
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Aug 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

windows: new -Wreturn-type warnings after #19203
4 participants