mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2024-12-12 20:18:00 +01:00
test: fix compiler warnings about missing return value checks
This commit is contained in:
parent
0062dbac3b
commit
e9d645ecee
1 changed files with 9 additions and 3 deletions
|
@ -26,8 +26,12 @@ static char* tmpdir = NULL;
|
||||||
|
|
||||||
static int character_setup(void** state) {
|
static int character_setup(void** state) {
|
||||||
char dir[255] = "libsuperderpy-XXXXXX";
|
char dir[255] = "libsuperderpy-XXXXXX";
|
||||||
mkdtemp(dir);
|
if (!mkdtemp(dir)) {
|
||||||
chdir(dir);
|
exit(1);
|
||||||
|
}
|
||||||
|
if (chdir(dir)) {
|
||||||
|
exit(2);
|
||||||
|
}
|
||||||
mkdir("data", 0700);
|
mkdir("data", 0700);
|
||||||
mkdir("data/sprites", 0700);
|
mkdir("data/sprites", 0700);
|
||||||
mkdir("data/sprites/test", 0700);
|
mkdir("data/sprites/test", 0700);
|
||||||
|
@ -43,7 +47,9 @@ static int character_teardown(void** state) {
|
||||||
rmdir("data/sprites/test");
|
rmdir("data/sprites/test");
|
||||||
rmdir("data/sprites");
|
rmdir("data/sprites");
|
||||||
rmdir("data");
|
rmdir("data");
|
||||||
chdir("..");
|
if (chdir("..")) {
|
||||||
|
exit(3);
|
||||||
|
}
|
||||||
rmdir(tmpdir);
|
rmdir(tmpdir);
|
||||||
free(tmpdir);
|
free(tmpdir);
|
||||||
return engine_teardown(state);
|
return engine_teardown(state);
|
||||||
|
|
Loading…
Reference in a new issue