forked from github/server
gcc reports unused variable.
and for once, that points to a bug!
This commit is contained in:
parent
3cb24299fa
commit
326f543ece
|
@ -72,6 +72,7 @@ void setguard(unit * u, bool enabled)
|
|||
} else {
|
||||
assert(!fval(u, UFL_MOVED));
|
||||
assert(u->status < ST_FLEE);
|
||||
assert(u->region->land);
|
||||
fset(u, UFL_GUARD);
|
||||
fset(u->region, RF_GUARDED);
|
||||
}
|
||||
|
|
|
@ -143,7 +143,7 @@ static void test_update_guard(CuTest * tc)
|
|||
t_plain = test_create_terrain("plain", LAND_REGION);
|
||||
itype = it_get_or_create(rt_get_or_create("sword"));
|
||||
new_weapontype(itype, 0, frac_zero, NULL, 0, 0, 0, SK_MELEE, 2);
|
||||
r = test_create_region(0, 0, t_ocean);
|
||||
r = test_create_region(0, 0, t_plain);
|
||||
ug = test_create_unit(test_create_faction(0), r);
|
||||
i_change(&ug->items, itype, 1);
|
||||
set_level(ug, SK_MELEE, 2);
|
||||
|
|
Loading…
Reference in New Issue