From 4a1ebc0aae8d2a8475518d197b7b7451e4d4f414 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Thu, 8 Sep 2011 13:49:09 -0400 Subject: [PATCH] netcmd plugin: Add work-around for GCC warning. Change-Id: Iec6ffaf77e4ef3be90a677d3c51804affcf532cc --- src/netcmd.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/netcmd.c b/src/netcmd.c index c2a0ddb3..a4c443c5 100644 --- a/src/netcmd.c +++ b/src/netcmd.c @@ -421,14 +421,18 @@ static int nc_connection_init (nc_connection_t *conn) /* {{{ */ if (conn->have_tls_session) { int status; + intptr_t fd; conn->read_buffer = malloc (NC_READ_BUFFER_SIZE); if (conn->read_buffer == NULL) return (ENOMEM); memset (conn->read_buffer, 0, NC_READ_BUFFER_SIZE); + /* Make (relatively) sure that 'fd' and 'void*' have the same size to make + * GCC happy. */ + fd = (intptr_t) conn->fd; gnutls_transport_set_ptr (conn->tls_session, - (gnutls_transport_ptr_t) conn->fd); + (gnutls_transport_ptr_t) fd); while (42) { -- 2.11.0