Remove unused parameter names in StatusArg.h#8976
Remove unused parameter names in StatusArg.h#8976annafilimonova1 wants to merge 1 commit intoFirebirdSQL:masterfrom
Conversation
|
I have no idea how parameter name in declaration could be [un]used. |
Oops, it is not only declarations, it contains empty bodies. |
Agreed. |
|
Unfortunately compilers disagree and produce warning for such cases. That's what |
What compiler and which warnings ? I see none. |
You don't see them just because Firebird build system suppress too many diagnostic messages. |
|
Your case is very far from Firebird code above. |
Result is exactly the same: Warning-less build would be much more useful than nested namespaces... |
Exactly. This is why this warning in this place is completely useless and wrong. |
|
On 4/3/26 01:02, Vlad Khorsun wrote:
*hvlad* left a comment (FirebirdSQL/firebird#8976)
<#8976?email_source=notifications&email_token=AA44OUP5I7L5I7XSBD2D7TT4T3PRHA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIMJYGA3TEMZUGQ22M4TFMFZW63VKON2WE43DOJUWEZLEUVSXMZLOOS2XA4S7MNXW23LFNZ2F633QMVXF6Y3MNFRWW#issuecomment-4180723445>
Result is exactly the same:
Exactly. This is why this warning in this place is completely useless
and wrong.
Agreed. On my mind presence of parameter names makes code better human
readable and let compiler provide better error messages, specially in a
case when there are many parameters.
|
|
That's why |
|
In short: not in this case |
|
JFYI: this attribute is not inheritable. |
wow! this change everything (nope) I have no idea why do you wrote it. |
|
When function's parameter isn't mentioned in function's body, compilers (and code analyzers) issue a warning. There are four ways to handle that:
First two options are bad because warnings are your friends helping to discover bugs in code. Last two options are used case-per-case and show readers that unused parameter is the writer's intention, not mistake. |
|
You wrong again. Read this, for example. I'm insist that:
In this case, when declaration of virtual function in very base class is combined with its empty definition, one may avoid
But I didn't consider it as necessary at all. |
Finally you said something that make sense. |
|
Originally parameters were named. Names were removed by Claudio to eliminate warnings (which implies he had seen them). Then two new methods were added, again with named parameters. This PR eliminates the new warnings again (and it follows the existing practice in this file). I'm open to any arguments except those reverting us back to unnecessary warnings. Personally, I don't like |
Part of closed #8938