From: Ludovic Courtès Date: Wed, 23 Sep 2009 09:07:13 +0000 (+0200) Subject: Fix integer/pointer cast warnings in the Guile bindings on x86_64. X-Git-Tag: gnutls_2_9_7~18 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e7622a04bdddf56fb5bb5f087885557a2ffb281d;p=thirdparty%2Fgnutls.git Fix integer/pointer cast warnings in the Guile bindings on x86_64. * guile/src/core.c (do_fill_port, fill_session_record_port_input, scm_gnutls_set_session_transport_fd_x): Make sure pointer/integer casts use integers of the right size. --- diff --git a/guile/src/core.c b/guile/src/core.c index 2eafd740a1..f791ef80ff 100644 --- a/guile/src/core.c +++ b/guile/src/core.c @@ -22,6 +22,7 @@ #endif #include +#include #include #include #include @@ -787,7 +788,7 @@ do_fill_port (void *data) else scm_gnutls_error (result, "fill_session_record_port_input"); - return ((void *) chr); + return ((void *) (uintptr_t) chr); } /* Fill in the input buffer of PORT. */ @@ -813,11 +814,11 @@ fill_session_record_port_input (SCM port) if (SCM_GNUTLS_SESSION_TRANSPORT_IS_FD (c_session)) /* SESSION's underlying transport is a raw file descriptor, so we must leave "Guile mode" to allow the GC to run. */ - chr = (int) scm_without_guile (do_fill_port, &c_args); + chr = (intptr_t) scm_without_guile (do_fill_port, &c_args); else /* SESSION's underlying transport is a port, so don't leave "Guile mode". */ - chr = (int) do_fill_port (&c_args); + chr = (intptr_t) do_fill_port (&c_args); } else chr = (int) *c_port->read_pos; @@ -939,7 +940,7 @@ SCM_DEFINE (scm_gnutls_set_session_transport_fd_x, c_session = scm_to_gnutls_session (session, 1, FUNC_NAME); c_fd = (int) scm_to_uint (fd); - gnutls_transport_set_ptr (c_session, (gnutls_transport_ptr_t) c_fd); + gnutls_transport_set_ptr (c_session, (gnutls_transport_ptr_t) (intptr_t) c_fd); SCM_GNUTLS_SET_SESSION_TRANSPORT_IS_FD (c_session, 1);