nfs01: Fix warnings

This commit is contained in:
Sebastian Huber
2022-06-01 10:39:30 +02:00
parent 2e696c6232
commit 26963fa0cd

View File

@@ -145,7 +145,7 @@ test_walk_tree(const char *start, walk_tree_callout callout, void *data)
while (dir != NULL && active) { while (dir != NULL && active) {
test_dir *tmp_dir; test_dir *tmp_dir;
if (active && dir->dirs == NULL && dir->indir == NULL) { if (active && dir->dirs == NULL && dir->indir == NULL) {
struct DIR *ddir; DIR *ddir;
rtems_test_errno_assert((ddir = opendir(".")) != NULL); rtems_test_errno_assert((ddir = opendir(".")) != NULL);
while (active) { while (active) {
struct dirent *dp; struct dirent *dp;
@@ -209,6 +209,7 @@ test_walk_tree(const char *start, walk_tree_callout callout, void *data)
} }
} }
#if NFS_TREE_WALK
typedef struct test_printer_data { typedef struct test_printer_data {
char path[MAXPATHLEN]; char path[MAXPATHLEN];
int count; int count;
@@ -256,6 +257,7 @@ test_walk_tree_printer(walk_tree_dir state,
} }
return true; return true;
} }
#endif
static bool static bool
test_walk_tree_unlink(walk_tree_dir state, test_walk_tree_unlink(walk_tree_dir state,
@@ -280,7 +282,7 @@ test_walk_tree_unlink(walk_tree_dir state,
static void static void
test_setup(const char *base) test_setup(const char *base)
{ {
struct DIR *ddir; DIR *ddir;
printf("test: nfs: setup\n"); printf("test: nfs: setup\n");
printf("test: nfs: opendir: %s\n", base); printf("test: nfs: opendir: %s\n", base);
rtems_test_errno_assert((ddir = opendir(base)) != NULL); rtems_test_errno_assert((ddir = opendir(base)) != NULL);