Useless, possibly wrongly used variable in logic/immovable.cc

Bug #1283514 reported by Hans Joachim Desserud
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Low
Unassigned

Bug Description

Cppcheck warns that the scope can be reduced for the variable "program" on line 215 in src/logic/immovable.cc. From what I can see this local variable is only used in the catch block of a try-catch right below, hence the warning. However, when moved into the catch block it serves no purpose because it would be created only to be promptly deleted again.

It does seem like someone had an intention with placing it there though, so I think someone should do a quick code review of this method to figure out whether "program" indeed should be used in some way.

Related branches

Revision history for this message
SirVer (sirver) wrote :

indeed, seems like a leftover. removed.

Changed in widelands:
status: New → Fix Committed
milestone: none → build19-rc1
GunChleoc (gunchleoc)
Changed in widelands:
status: Fix Committed → Fix Released
Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in build19-rc1.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.