Clean up dead stores

Does not change optimized code (gcc -O).

Spotted by the Clang Static Analyzer.
This commit is contained in:
Markus Armbruster 2010-01-16 17:40:28 +01:00
parent 3650587dab
commit b8f5eaff0b
25 changed files with 66 additions and 116 deletions

View file

@ -178,10 +178,9 @@ lnd_take_casualty(int combat_mode, struct ulist *llp, int cas)
taken = llp->unit.land.lnd_item[I_MILIT];
/* Spies always die */
if (((struct lchrstr *)llp->chrp)->l_flags & L_SPY) {
eff_eq = 100;
if (((struct lchrstr *)llp->chrp)->l_flags & L_SPY)
llp->unit.land.lnd_effic = 0;
} else {
else {
eff_eq = ldround(cas * 100.0 /
((struct lchrstr *)llp->chrp)->l_item[I_MILIT], 1);
llp->unit.land.lnd_effic -= eff_eq;
@ -1054,7 +1053,6 @@ lnd_mar_one_sector(struct emp_qelem *list, int dir, natid actor,
/* move survivors to done */
for (qp = cur.q_back; qp != &cur; qp = next) {
next = qp->q_back;
llp = (struct ulist *)qp;
emp_remque(qp);
emp_insque(qp, &done);
}