summaryrefslogtreecommitdiff
path: root/guile
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2009-09-23 11:07:13 +0200
committerLudovic Courtès <ludo@gnu.org>2009-09-23 11:08:19 +0200
commite7622a04bdddf56fb5bb5f087885557a2ffb281d (patch)
tree2b938a51dcf8e26484ad789ccb93046e9a71548b /guile
parent1dc068cb9c86df9c305502ae7a4522b1515e8c42 (diff)
downloadgnutls-e7622a04bdddf56fb5bb5f087885557a2ffb281d.tar.gz
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.
Diffstat (limited to 'guile')
-rw-r--r--guile/src/core.c9
1 files changed, 5 insertions, 4 deletions
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 <stdio.h>
+#include <stdint.h>
#include <string.h>
#include <gnutls/gnutls.h>
#include <libguile.h>
@@ -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);