forked from github/server
eliminate warnings from cppcheck
This commit is contained in:
parent
88dd9203dd
commit
818b309ebf
1 changed files with 3 additions and 7 deletions
|
@ -278,13 +278,11 @@ static void test_readwrite_dead_faction_group(CuTest *tc) {
|
||||||
CuAssertPtrEquals(tc, f2, factions);
|
CuAssertPtrEquals(tc, f2, factions);
|
||||||
write_game(&data);
|
write_game(&data);
|
||||||
free_gamedata();
|
free_gamedata();
|
||||||
f = f2 = NULL;
|
|
||||||
data.strm.api->rewind(data.strm.handle);
|
data.strm.api->rewind(data.strm.handle);
|
||||||
read_game(&data);
|
read_game(&data);
|
||||||
CuAssertPtrEquals(tc, NULL, findfaction(fno));
|
CuAssertPtrEquals(tc, NULL, findfaction(fno));
|
||||||
f2 = factions;
|
CuAssertPtrNotNull(tc, factions);
|
||||||
CuAssertPtrNotNull(tc, f2);
|
u = factions->units;
|
||||||
u = f2->units;
|
|
||||||
CuAssertPtrNotNull(tc, u);
|
CuAssertPtrNotNull(tc, u);
|
||||||
g = get_group(u);
|
g = get_group(u);
|
||||||
CuAssertPtrNotNull(tc, g);
|
CuAssertPtrNotNull(tc, g);
|
||||||
|
@ -313,13 +311,11 @@ static void test_readwrite_dead_faction_regionowner(CuTest *tc) {
|
||||||
remove_empty_units();
|
remove_empty_units();
|
||||||
write_game(&data);
|
write_game(&data);
|
||||||
free_gamedata();
|
free_gamedata();
|
||||||
f = NULL;
|
|
||||||
data.strm.api->rewind(data.strm.handle);
|
data.strm.api->rewind(data.strm.handle);
|
||||||
read_game(&data);
|
read_game(&data);
|
||||||
mstream_done(&data.strm);
|
mstream_done(&data.strm);
|
||||||
gamedata_done(&data);
|
gamedata_done(&data);
|
||||||
f = factions;
|
CuAssertPtrEquals(tc, NULL, factions);
|
||||||
CuAssertPtrEquals(tc, NULL, f);
|
|
||||||
r = regions;
|
r = regions;
|
||||||
CuAssertPtrNotNull(tc, r);
|
CuAssertPtrNotNull(tc, r);
|
||||||
CuAssertPtrEquals(tc, NULL, region_get_owner(r));
|
CuAssertPtrEquals(tc, NULL, region_get_owner(r));
|
||||||
|
|
Loading…
Reference in a new issue