forked from github/server
eliminate warnings from cppcheck
This commit is contained in:
parent
88dd9203dd
commit
818b309ebf
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue