aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2023-07-18 03:07:25 +0000
committerNIIBE Yutaka <[email protected]>2023-07-18 03:07:25 +0000
commit81055baf5c31dc3ff0b181994dc7eb883472dafa (patch)
treee582c258acf8f025d710ae7862552f48f61f9d04
parentcommon: Introduce FD_DBG to display gnupg_fd_t value. (diff)
downloadgnupg-81055baf5c31dc3ff0b181994dc7eb883472dafa.tar.gz
gnupg-81055baf5c31dc3ff0b181994dc7eb883472dafa.zip
dirmngr,kbk,tools: Fix type casting.
* dirmngr/http.c (send_request): Remove cast which is not needed. * kbx/kbx-client-util.c (prepare_data_pipe): Cast to HANDLE. * tools/gpg-connect-agent.c (do_open): Ditto. -- GnuPG-bug-id: 6508 Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r--dirmngr/http.c4
-rw-r--r--kbx/kbx-client-util.c2
-rw-r--r--tools/gpg-connect-agent.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/dirmngr/http.c b/dirmngr/http.c
index 211d167bd..2345ce8c1 100644
--- a/dirmngr/http.c
+++ b/dirmngr/http.c
@@ -2052,7 +2052,7 @@ send_request (ctrl_t ctrl, http_t hd, const char *httphost, const char *auth,
/* Until we support send/recv in estream under Windows we need
* to use es_fopencookie. */
# ifdef HAVE_W32_SYSTEM
- in = es_fopencookie ((void*)(unsigned int)hd->sock->fd, "rb",
+ in = es_fopencookie (hd->sock->fd, "rb",
simple_cookie_functions);
# else
in = es_fdopen_nc (hd->sock->fd, "rb");
@@ -2065,7 +2065,7 @@ send_request (ctrl_t ctrl, http_t hd, const char *httphost, const char *auth,
}
# ifdef HAVE_W32_SYSTEM
- out = es_fopencookie ((void*)(unsigned int)hd->sock->fd, "wb",
+ out = es_fopencookie (hd->sock->fd, "wb",
simple_cookie_functions);
# else
out = es_fdopen_nc (hd->sock->fd, "wb");
diff --git a/kbx/kbx-client-util.c b/kbx/kbx-client-util.c
index 9c7b57f2f..8cd6dc0f3 100644
--- a/kbx/kbx-client-util.c
+++ b/kbx/kbx-client-util.c
@@ -119,7 +119,7 @@ prepare_data_pipe (kbx_client_data_t kcd)
}
#ifdef HAVE_W32_SYSTEM
- err = assuan_sendfd (kcd->ctx, INT2FD (_get_osfhandle (inpipe[1])));
+ err = assuan_sendfd (kcd->ctx, (HANDLE)_get_osfhandle (inpipe[1]));
#else
err = assuan_sendfd (kcd->ctx, inpipe[1]);
#endif
diff --git a/tools/gpg-connect-agent.c b/tools/gpg-connect-agent.c
index 6be401c4f..ab96d3b02 100644
--- a/tools/gpg-connect-agent.c
+++ b/tools/gpg-connect-agent.c
@@ -1040,7 +1040,7 @@ do_open (char *line)
HANDLE prochandle, handle, newhandle;
char numbuf[35];
- handle = (void*)_get_osfhandle (fd);
+ handle = (HANDLE)_get_osfhandle (fd);
prochandle = OpenProcess (PROCESS_DUP_HANDLE, FALSE, server_pid);
if (!prochandle)