-
Notifications
You must be signed in to change notification settings - Fork 38.7k
fuzz: silence a compiler warning about unused CBanEntry comparator #22557
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
Conversation
Actually, I mentioned it expecting no one will silent a temporary warning 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No strong opinion on this. It will be interesting to see the response to this.
Do we want to have a policy of silencing temporary warnings when their is a clear plan that will silence them? --- this warning will be silenced when the fix for the banman fuzz test is implemented.
On the other hand, the argument could be made that #22517 should not have allowed this warning to come up and this PR can be seen as a follow-up to that PR. A followup which finishes properly temporarily disabling the assert.
Tested that this silences the warning on Ubuntu 20.04:
master:
$ make 2>&1 > /dev/null | grep -o "Wunused-function" | wc -l
1
pr:
$ make 2>&1 > /dev/null | grep -o "Wunused-function" | wc -l
0
|
This warning disturbs developers' workflow (compilation with It does not matter whether it is temporary, semi-temporary, permanently-temporary, temo-low or should just be painted in purple color. |
|
cr ACK 83dd35260b30eaedc8822326f75c037d5e51f883 Sorry didn't see the warning in my patch |
```
test/fuzz/banman.cpp:35:13: warning: unused function 'operator==' [-Wunused-function]
static bool operator==(const CBanEntry& lhs, const CBanEntry& rhs)
^
1 warning generated.
```
83dd352 to
787296e
Compare
|
|
hebasto
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 787296e
|
I don't think we need to follow every temporary change with a change to clean up warnings. If there is intent to use this function soon, I do not see the point of merging an intermediate PR that removes it just to be reintroduced. Edit: oh, you didn't remove it. This seems fine to me (though still I don't think we should be too busybody about this). |
|
cr ACK 787296e again my fault for not noticing the compiler warning in the initial patch |
|
cr ACK 787296e |
…anEntry comparator 787296e fuzz: silence a compiler warning about unused CBanEntry comparator (Vasil Dimov) Pull request description: ``` test/fuzz/banman.cpp:35:13: warning: unused function 'operator==' [-Wunused-function] static bool operator==(const CBanEntry& lhs, const CBanEntry& rhs) ^ 1 warning generated. ``` See bitcoin#22517 (comment) ACKs for top commit: MarcoFalke: cr ACK 787296e practicalswift: cr ACK 787296e hebasto: ACK 787296e Tree-SHA512: 72e483cef249170160879cf4b69b787fb6c539d61dda423f618e2c5f130bee8c42897487751e5b58e7679cdb0153eb80efcb104e8a85095daa60d47e39ce78b8
```
test/fuzz/banman.cpp:35:13: warning: unused function 'operator==' [-Wunused-function]
static bool operator==(const CBanEntry& lhs, const CBanEntry& rhs)
^
1 warning generated.
```
Github-Pull: bitcoin#22557
Rebased-From: 787296e
|
UPDATE: #22629 (comment) |
```
test/fuzz/banman.cpp:35:13: warning: unused function 'operator==' [-Wunused-function]
static bool operator==(const CBanEntry& lhs, const CBanEntry& rhs)
^
1 warning generated.
```
Github-Pull: bitcoin#22557
Rebased-From: 787296e
```
test/fuzz/banman.cpp:35:13: warning: unused function 'operator==' [-Wunused-function]
static bool operator==(const CBanEntry& lhs, const CBanEntry& rhs)
^
1 warning generated.
```
Github-Pull: bitcoin#22557
Rebased-From: 787296e
```
test/fuzz/banman.cpp:35:13: warning: unused function 'operator==' [-Wunused-function]
static bool operator==(const CBanEntry& lhs, const CBanEntry& rhs)
^
1 warning generated.
```
Github-Pull: bitcoin#22557
Rebased-From: 787296e
```
test/fuzz/banman.cpp:35:13: warning: unused function 'operator==' [-Wunused-function]
static bool operator==(const CBanEntry& lhs, const CBanEntry& rhs)
^
1 warning generated.
```
Github-Pull: bitcoin#22557
Rebased-From: 787296e
```
test/fuzz/banman.cpp:35:13: warning: unused function 'operator==' [-Wunused-function]
static bool operator==(const CBanEntry& lhs, const CBanEntry& rhs)
^
1 warning generated.
```
Github-Pull: bitcoin#22557
Rebased-From: 787296e
```
test/fuzz/banman.cpp:35:13: warning: unused function 'operator==' [-Wunused-function]
static bool operator==(const CBanEntry& lhs, const CBanEntry& rhs)
^
1 warning generated.
```
Github-Pull: bitcoin#22557
Rebased-From: 787296e
See #22517 (comment)