[PATCH 1/3] Silence compiler warning in 64-bit mode

Alexandre Oliva lxoliva en fsfla.org
Jue Mar 6 13:07:14 UTC 2014


Casting an int to gnutls_transport_ptr_t gets a warning when
sizeof(void*)!=sizeof(int).  Casting the int to int_ptr first
silences the warning.
---
 rnetclient.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rnetclient.c b/rnetclient.c
index 2b98cc4..0ce8593 100644
--- a/rnetclient.c
+++ b/rnetclient.c
@@ -311,7 +311,7 @@ int main(int argc, char **argv)
 			r == EAI_SYSTEM ? strerror(errno) : gai_strerror(r));
 		exit(1);
 	}
-	gnutls_transport_set_ptr(session, (gnutls_transport_ptr_t) c);
+	gnutls_transport_set_ptr(session, (gnutls_transport_ptr_t)(intptr_t) c);
 	r = handshake(c);
 	if (r < 0) {
 		exit(1);



Más información sobre la lista de distribución Softwares-impostos