Skip to content

Conversation

practicalswift
Copy link
Contributor

Annotate unused parameters with [[maybe_unused]].

@practicalswift practicalswift force-pushed the annotate-intentionally-unused-parameters branch from 87ee5eb to a363c5d Compare September 10, 2018 21:29
@DrahtBot
Copy link
Contributor

DrahtBot commented Sep 10, 2018

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

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #14605 (Return of the Banman by dongcarl)
  • #14224 (Document intentional and unintentional unsigned integer overflows (wraparounds) using annotations by practicalswift)
  • #13864 (validation: Document where we are intentionally ignoring bool return values from validation related functions by practicalswift)
  • #13815 (util: Add [[nodiscard]] to all {Decode,Parse}... functions returning bool by practicalswift)

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.

@Empact
Copy link
Contributor

Empact commented Sep 11, 2018

Concept ACK maybe_unused is a C++17 introduction, I assume it's ok to use it though based on preprocessor activation.

@practicalswift
Copy link
Contributor Author

@Empact Yes, it is worth noting that both clang++ and g++ support [[maybe_unused]] also under -std=c++11. Luckily no need for wait for C++17 :-)

@Empact
Copy link
Contributor

Empact commented Sep 12, 2018

BlockNotifyGenesisWait uses unnamed args to mark them as unreferenced.
Should we name there or apply that here?

@practicalswift practicalswift force-pushed the annotate-intentionally-unused-parameters branch from a363c5d to 54b3d00 Compare September 12, 2018 08:17
@practicalswift
Copy link
Contributor Author

@ken2812221 Updated to address feedback. Please re-review :-)

@practicalswift practicalswift force-pushed the annotate-intentionally-unused-parameters branch from 54b3d00 to 9cd951c Compare September 21, 2018 13:18
@practicalswift
Copy link
Contributor Author

@arvidn Good points. Now updated. Also added a developer note. Please re-review :-)

@DrahtBot
Copy link
Contributor

Coverage Change (pull 14194) Reference (master)
Lines +0.0375 % 87.0361 %
Functions +0.1235 % 84.1130 %
Branches +0.0095 % 51.5451 %

@DrahtBot DrahtBot mentioned this pull request Oct 30, 2018
@practicalswift practicalswift deleted the annotate-intentionally-unused-parameters branch April 10, 2021 19:36
@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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants