Value stored to unread variable in map_io/widelands_map_buildingdata_data_packet.cc
Bug #1205901 reported by
Hans Joachim Desserud
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Fix Released
|
Low
|
cghislai |
Bug Description
On line 271 map_io/
Found by scan-build in r6675.
To post a comment you must log in.
yes that var is useless. The block could be replaced by buildings. front() ; >is_enhanced( )) { index(oldest- >name() ); Index:: First() ; i < t.get_nrbuildin gs(); ++i) { descr(i) ; ts().count( oldest_ idx)) { old_buildings. insert( b.m_old_ buildings. begin() , ob);
// iterate through all buildings to find first predecessor
const Tribe_Descr & t = b.descr().tribe();
while (true) {
const Building_Descr * oldest = b.m_old_
if (!oldest-
break;
}
const Building_Index & oldest_idx = t.building_
for (Building_Index i = Building_
Building_Descr const * ob = t.get_building_
if (ob->enhancemen
b.m_
break;
}
}
}
}