From 0e960d940a3b52406bb72af2750b6b6d29e39067 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Tue, 20 Apr 2010 01:11:35 +0000 Subject: common/ 2010-04-20 Marcus Brinkmann * logging.c (do_log_ignore_arg): New helper function. (log_string): Use it to remove ugly volatile hack that causes gcc warning. (log_flush): Likewise. * sysutils.c (gnupg_unsetenv) [!HAVE_W32CE_SYSTEM]: Return something. (gnupg_setenv) [!HAVE_W32CE_SYSTEM]: Likewise. * pka.c (get_pka_info): Solve strict aliasing rule violation. * t-exechelp.c (test_close_all_fds): Use dummy variables to silence gcc warning. kbx/ 2010-04-20 Marcus Brinkmann * keybox-update.c [!HAVE_DOSISH_SYSTEM]: Include ../common/sysutils.h even then to silence gcc warning about missing declaration of gnupg_remove. tools/ 2010-04-20 Marcus Brinkmann * gpgconf-comp.c (option_check_validity): Use dummy variables to silence gcc warning. --- common/t-exechelp.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'common/t-exechelp.c') 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); -- cgit v1.2.3