View Issue Details

IDProjectCategoryView StatusLast Update
0005153unrealircdpublic2018-09-25 13:58
Reportershenlanting Assigned Tosyzop  
PrioritynormalSeveritytweakReproducibilityhave not tried
Status closedResolutionno change required 
Summary0005153: Unused variables
DescriptionHi all,
There are some unused variables found by Qihoo360 CodeSafe Team.
Details as bellow:

'mask' declared in line 70 in file 'src/modules/extbans/account.c'
'i' declared in line 991 and line 1052 in file 'src/modules/antirandom.c'
'i' declared in line 110 in file 'src/api-isupport.c'
...

Is there any design that these variables will be used later?
If not, could we delete them?
3rd party modules

Activities

syzop

2018-09-25 13:21

administrator   ~0020349

Last edited: 2018-09-25 13:58

There are many unused variables. I would ask you not to report them :)

EDIT: That was a rather short and possibly harsh response from me. I'll elaborate in next comment.

syzop

2018-09-25 13:57

administrator   ~0020351

See 0005150:0020350 in 0005150 for a more detailed response.

There will be many unused variables in the UnrealIRCd code. We explicitly compile with a warning flag to disable such warnings. They don't harm anyone, they are optimized out by -O2 so do not cost any memory (not to mention that it's all stack, so temporary).
One day, sure, maybe we can clean some up, but until that day I think it's better to just accept the fact that we have unused variables here and there.
As an open source project with scarce resources we have to choose where to spend our time on, and things like this are simply not worth it.

Issue History

Date Modified Username Field Change
2018-09-25 11:29 shenlanting New Issue
2018-09-25 13:21 syzop Note Added: 0020349
2018-09-25 13:57 syzop Assigned To => syzop
2018-09-25 13:57 syzop Status new => closed
2018-09-25 13:57 syzop Resolution open => no change required
2018-09-25 13:57 syzop Note Added: 0020351
2018-09-25 13:58 syzop Note Edited: 0020349