diff --git a/glib/tests/keyfile.c b/glib/tests/keyfile.c index 546878321..8e428f4eb 100644 --- a/glib/tests/keyfile.c +++ b/glib/tests/keyfile.c @@ -3,7 +3,6 @@ #include #include #include -#include static GKeyFile * load_data (const gchar *data, @@ -1381,7 +1380,9 @@ test_save (void) file = g_strdup ("key_file_XXXXXX"); fd = g_mkstemp (file); g_assert (fd != -1); - close (fd); + ok = g_close (fd, &error); + g_assert (ok); + g_assert_no_error (error); ok = g_key_file_save_to_file (kf, file, &error); g_assert (ok); g_assert_no_error (error);