[Help-gnutls] Re: gnutls_transport_ptr and int fd's
Rainer Gerhards
rgerhards at gmail.com
Mon May 5 09:35:55 CEST 2008
Thanks for the quick response .. and sorry for me replying just now. I
somehow missed the message :)
On Tue, Apr 29, 2008 at 11:38 PM, Simon Josefsson <simon at josefsson.org> wrote:
> "Rainer Gerhards" <rgerhards at gmail.com> 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);
This is what I am doing. A snapshot of the actual code is here:
http://git.adiscon.com/?p=rsyslog.git;a=blob;f=runtime/nsd_gtls.c;h=b1713240399448e042a27d22caf5a2f044fd65a1;hb=tls
(e.g. in line 364).
I replaced this with
int ii = 6;
gnutls_transport_set_ptr(pNew->sess, (gnutls_transport_ptr) ii);
But I still get the same warning message. I am a bit puzzled,
especially as this seems to be unusual...
Rainer
More information about the Gnutls-help
mailing list