[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-gnutls] Re: gnutls_transport_ptr and int fd's
From: |
Simon Josefsson |
Subject: |
[Help-gnutls] Re: gnutls_transport_ptr and int fd's |
Date: |
Tue, 29 Apr 2008 23:38:50 +0200 |
User-agent: |
Gnus/5.110009 (No Gnus v0.9) Emacs/22.2 (gnu/linux) |
"Rainer Gerhards" <address@hidden> writes:
> Hi all,
>
> [working on Fedora 8 with GCC]
>
> I have a minor nit. The root cause is probably not in GnuTLS but in me
> overlooking something...
>
> I supply the int fd I got from socket() to gnutls_transport_set_ptr().
> However, when I do so, I receive the following GCC warning:
>
> cast to pointer from integer of different size
>
> This is annoying during the build process, but of course tolerable. I
> would prefer to see this warning go away, but I do not like to reduce
> GCCs warning level. Any advise would be appreciated.
Try to use a cast when calling the function, such as:
gnutls_transport_set_ptr (session, (gnutls_transport_ptr) sockfd);
> PS: I have finally gotten my code ready for TLS implementation. I
> managed to send the first TLS records within an hour or so. Good
> examples, excellent API [of course, my implementation is currently far
> from being secure ;)].
Cool!
/Simon