Dead assignment or increment (variables which have values assigned, but are then never read again)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Fix Released
|
Low
|
Unassigned |
Bug Description
Found by the clang static analyzer (clang 3.3) in Widelands bzr r6594. (Does not include issues found in minizip and pluto, since we would like to keep the source of those unmodified)
Description: Value stored to 'dnew_2' is never read
File: /home/arch/
Line: 459
Description: Value stored to 'posx' is never read
File: /home/arch/
Line: 71
Description: Value stored to 'posy' is never read
File: /home/arch/
Line: 127
Description: Value stored to 'posx' is never read
File: /home/arch/
Line: 184
Description: Value stored to 'totalbreadth' is never read
File: /home/arch/
Line: 151
Description: Value stored to 'totalbreadth' is never read
File: /home/arch/
Line: 156
(Note that some of these will also show up as compilation warnings)
I think most of them are correctly identified and should be fixed but are not critical. I would suggest to leave the minizip code alone - ideally we do not wish to bundle this in the first place.
This seems like a low hanging fruit for new developers to get started in the code base.