mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2024-12-05 00:38: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) {
|
||||
char dir[255] = "libsuperderpy-XXXXXX";
|
||||
mkdtemp(dir);
|
||||
chdir(dir);
|
||||
if (!mkdtemp(dir)) {
|
||||
exit(1);
|
||||
}
|
||||
if (chdir(dir)) {
|
||||
exit(2);
|
||||
}
|
||||
mkdir("data", 0700);
|
||||
mkdir("data/sprites", 0700);
|
||||
mkdir("data/sprites/test", 0700);
|
||||
|
@ -43,7 +47,9 @@ static int character_teardown(void** state) {
|
|||
rmdir("data/sprites/test");
|
||||
rmdir("data/sprites");
|
||||
rmdir("data");
|
||||
chdir("..");
|
||||
if (chdir("..")) {
|
||||
exit(3);
|
||||
}
|
||||
rmdir(tmpdir);
|
||||
free(tmpdir);
|
||||
return engine_teardown(state);
|
||||
|
|
Loading…
Reference in a new issue