refactor: Add [[nodiscard]] where ignoring a Result return type is an error #27774
pull maflcko wants to merge 2 commits into bitcoin:master from maflcko:2305-nodiscard-result-error- changing 7 files +14 −15-
maflcko commented at 11:36 am on May 29, 2023: memberOnly add it for those where it is an error to ignore. Also, fix the gcc compile warning #25977 (comment). Also, fix iwyu for touched header files.
-
Add [[nodiscard]] where ignoring a Result return type is an error dddde27f6f
-
fix includes for touched header files (iwyu) fa5680b752
-
DrahtBot commented at 11:36 am on May 29, 2023: contributor
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Reviews
See the guideline for information on the review process.
Type Reviewers ACK TheCharlatan, stickies-v If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
Conflicts
Reviewers, this pull request conflicts with the following ones:
- #27711 (kernel: Remove shutdown from kernel library by TheCharlatan)
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.
-
DrahtBot renamed this:
refactor: Add [[nodiscard]] where ignoring a Result return type is an error
refactor: Add [[nodiscard]] where ignoring a Result return type is an error
on May 29, 2023 -
DrahtBot added the label Refactoring on May 29, 2023
-
TheCharlatan commented at 1:02 pm on May 29, 2023: contributor
Only add it for those where it is an error to ignore.
How did you select these?
-
maflcko commented at 1:08 pm on May 29, 2023: member
How did you select these?
I asked my brain if it thought that ignoring the return type would lead to errors in later code.
-
TheCharlatan approved
-
TheCharlatan commented at 1:45 pm on May 29, 2023: contributorACK fa5680b7520c340952239c4e25ebe505d16c7c39
-
stickies-v approved
-
stickies-v commented at 2:12 pm on May 30, 2023: contributor
ACK fa5680b7520c340952239c4e25ebe505d16c7c39
I looked at all sites where
Result
is either of typevoid
or some other descriptive/status type, and could not find any other places where the return value can never be ignored. -
stickies-v approved
-
stickies-v commented at 2:12 pm on May 30, 2023: contributor(hit send twice - duplicate post)
-
fanquake merged this on May 30, 2023
-
fanquake closed this on May 30, 2023
-
maflcko deleted the branch on May 30, 2023
-
sidhujag referenced this in commit 4b69edba9b on May 30, 2023
-
Fabcien referenced this in commit f3139ddbac on Dec 15, 2023
-
bitcoin locked this on May 29, 2024
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-21 18:12 UTC
More mirrored repositories can be found on mirror.b10c.me