Silence bogus warning when building with old GCC versions
[lttng-tools.git] / tests / unit / test_fd_tracker.c
index 8c0fc5ffe90a4dcc8b5052adf0dd99c7743122af..a6a2a44d2a4bf45ff2b8cdee04f5919254917f25 100644 (file)
@@ -83,7 +83,9 @@ int fd_count(void)
        }
        /* Don't account for the file descriptor opened by opendir(). */
         count--;
-       closedir(dir);
+       if (closedir(dir)) {
+               perror("# Failed to close test program's self/fd directory file descriptor");
+       }
 end:
        return count;
 }
@@ -664,7 +666,7 @@ void test_unlink(void)
        char tmp_path_pattern[] = TMP_DIR_PATTERN;
        const char *output_dir;
        struct fs_handle *handles[handles_to_open];
-       struct fs_handle *new_handle;
+       struct fs_handle *new_handle = NULL;
        char *file_path;
        char *unlinked_file_path;
        char *unlinked_file_path_suffix;
This page took 0.023465 seconds and 4 git commands to generate.