[Pkg-gnupg-commit] [gnupg2] 192/241: Silence compiler warnings related to not using assuan_fd_t.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Wed Dec 9 20:32:15 UTC 2015
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch master
in repository gnupg2.
commit 501436ab0f9d8e7d56b2f5e344006be5f5a3c653
Author: Werner Koch <wk at gnupg.org>
Date: Fri Nov 27 17:58:51 2015 +0100
Silence compiler warnings related to not using assuan_fd_t.
* common/call-gpg.c (start_gpg): Use assuan_fd_t. Note that the
declaration was already fixed by a previous change.
* dirmngr/server.c (cmd_getinfo): Use assuan_fd_t.
--
Note that this matters only for Windows and it does not harm as long
as we can only build for 32 bit Windows withsizeof(int)==sizeof(void*).
Signed-off-by: Werner Koch <wk at gnupg.org>
---
common/call-gpg.c | 4 ++--
dirmngr/server.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/common/call-gpg.c b/common/call-gpg.c
index 4a32c88..cd865ef 100644
--- a/common/call-gpg.c
+++ b/common/call-gpg.c
@@ -47,7 +47,7 @@ start_gpg (ctrl_t ctrl, const char *gpg_program, strlist_t gpg_arguments,
assuan_context_t ctx = NULL;
const char *pgmname;
const char **argv;
- int no_close_list[5];
+ assuan_fd_t no_close_list[5];
int i;
char line[ASSUAN_LINELENGTH];
@@ -100,7 +100,7 @@ start_gpg (ctrl_t ctrl, const char *gpg_program, strlist_t gpg_arguments,
no_close_list[i++] = assuan_fd_from_posix_fd (input_fd);
if (output_fd != -1)
no_close_list[i++] = assuan_fd_from_posix_fd (output_fd);
- no_close_list[i] = -1;
+ no_close_list[i] = ASSUAN_INVALID_FD;
/* Connect to GPG and perform initial handshaking. */
err = assuan_pipe_connect (ctx, gpg_program, argv, no_close_list,
diff --git a/dirmngr/server.c b/dirmngr/server.c
index 536354c..32c265b 100644
--- a/dirmngr/server.c
+++ b/dirmngr/server.c
@@ -2126,8 +2126,8 @@ cmd_getinfo (assuan_context_t ctx, char *line)
#if ASSUAN_VERSION_NUMBER >= 0x020402
/* Check whether we can connect to the proxy. We use a
special feature introduced with libassuan 2.4.2. */
- int sock = assuan_sock_connect_byname (NULL, 0, 0, NULL,
- ASSUAN_SOCK_TOR);
+ assuan_fd_t sock = assuan_sock_connect_byname (NULL, 0, 0, NULL,
+ ASSUAN_SOCK_TOR);
if (sock == ASSUAN_INVALID_FD)
{
err = assuan_write_status
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list