diff options
author | Simon Josefsson <simon@josefsson.org> | 2006-06-27 10:06:50 +0000 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2006-06-27 10:06:50 +0000 |
commit | 3d86adaf6af6c9a9898d1dc003a9beae5a0cddd0 (patch) | |
tree | b68924bd3d195a5b2460f2914159b4990be30823 /lib | |
parent | 3a83b2c2e01be0d0a35cc69d6ff6affc44afcc4d (diff) | |
download | gnutls-3d86adaf6af6c9a9898d1dc003a9beae5a0cddd0.tar.gz |
Avoid warnings when casting void* to int.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gnutls_buffers.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/gnutls_buffers.c b/lib/gnutls_buffers.c index 497f196284..69add935a2 100644 --- a/lib/gnutls_buffers.c +++ b/lib/gnutls_buffers.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation + * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation * * Author: Nikos Mavroyanopoulos * @@ -77,6 +77,8 @@ RET (int err) # include <io_debug.h> #endif +#define GNUTLS_POINTER_TO_INT(_) ((int) GNUTLS_POINTER_TO_INT_CAST (_)) + /* Buffers received packets of type APPLICATION DATA and * HANDSHAKE DATA. */ @@ -265,7 +267,8 @@ _gnutls_read (gnutls_session_t session, void *iptr, { if (session->internals._gnutls_pull_func == NULL) - i = recv ((int) fd, &ptr[sizeOfPtr - left], left, flags); + i = recv (GNUTLS_POINTER_TO_INT(fd), &ptr[sizeOfPtr - left], + left, flags); else i = session->internals._gnutls_pull_func (fd, &ptr[sizeOfPtr - @@ -701,7 +704,7 @@ _gnutls_io_write_buffered (gnutls_session_t session, { if (session->internals._gnutls_push_func == NULL) - i = send ((int) fd, &ptr[n - left], left, 0); + i = send (GNUTLS_POINTER_TO_INT(fd), &ptr[n - left], left, 0); else i = session->internals._gnutls_push_func (fd, &ptr[n - left], left); |