diff options
Diffstat (limited to 'common/t-exechelp.c')
-rw-r--r-- | common/t-exechelp.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/common/t-exechelp.c b/common/t-exechelp.c index 600379b69..5c5c5d311 100644 --- a/common/t-exechelp.c +++ b/common/t-exechelp.c @@ -76,6 +76,7 @@ test_close_all_fds (void) int max_fd = get_max_fds (); int *array; int fd; + int dummy_fd; int initial_count, count, n; #if 0 char buffer[100]; @@ -92,10 +93,10 @@ test_close_all_fds (void) free (array); /* Some dups to get more file descriptors and close one. */ - dup (1); - dup (1); + dummy_fd = dup (1); + dummy_fd = dup (1); fd = dup (1); - dup (1); + dummy_fd = dup (1); close (fd); array = xget_all_open_fds (); @@ -136,14 +137,14 @@ test_close_all_fds (void) int except[] = { 20, 23, 24, -1 }; for (n=initial_count; n < 31; n++) - dup (1); + dummy_fd = dup (1); array = xget_all_open_fds (); if (verbose) print_open_fds (array); free (array); for (n=0; n < 5; n++) { - dup (1); + dummy_fd = dup (1); array = xget_all_open_fds (); if (verbose) print_open_fds (array); |