eliminate warnings from cppcheck

This commit is contained in:
Enno Rehling 2019-02-02 21:20:23 +01:00
parent 3b81b7797f
commit 35bbcac97b

View file

@ -278,13 +278,11 @@ static void test_readwrite_dead_faction_group(CuTest *tc) {
CuAssertPtrEquals(tc, f2, factions);
write_game(&data);
free_gamedata();
f = f2 = NULL;
data.strm.api->rewind(data.strm.handle);
read_game(&data);
CuAssertPtrEquals(tc, NULL, findfaction(fno));
f2 = factions;
CuAssertPtrNotNull(tc, f2);
u = f2->units;
CuAssertPtrNotNull(tc, factions);
u = factions->units;
CuAssertPtrNotNull(tc, u);
g = get_group(u);
CuAssertPtrNotNull(tc, g);
@ -313,13 +311,11 @@ static void test_readwrite_dead_faction_regionowner(CuTest *tc) {
remove_empty_units();
write_game(&data);
free_gamedata();
f = NULL;
data.strm.api->rewind(data.strm.handle);
read_game(&data);
mstream_done(&data.strm);
gamedata_done(&data);
f = factions;
CuAssertPtrEquals(tc, NULL, f);
CuAssertPtrEquals(tc, NULL, factions);
r = regions;
CuAssertPtrNotNull(tc, r);
CuAssertPtrEquals(tc, NULL, region_get_owner(r));