gnutls-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Warnings: pointer size vs. integer size


From: lfinsto
Subject: Warnings: pointer size vs. integer size
Date: Thu, 3 Dec 2009 16:22:59 +0100 (CET)
User-agent: SquirrelMail/1.4.9a

Hello,

I'm not sure if this will be of any use to you, but I'm sending it in
case it is.

In order to get rid of this warning:

ex-client1.c: In function ‘main’:
ex-client1.c:81: warning: cast to pointer from integer of different size
mv -f .deps/ex-client1.Tpo .deps/ex-client1.Po

I've made the following changes in `gnutls/configure.ac' and
`gnutls/doc/examples/ex-client1.c', which I've attached:

In `configure.ac':

#### Added.  LDF 2009.12.03.

AC_CHECK_SIZEOF([int])
AC_CHECK_SIZEOF([long int])
AC_CHECK_SIZEOF([void*])

#### End of added code.  LDF 2009.12.03.

In `gnutls/doc/examples/ex-client1.c':

Before `main':

/* Added.  LDF 2009.12.03.  */

#if (SIZEOF_VOIDP == SIZEOF_INT)
#define PTR_SIZE_INT
#undef  PTR_SIZE_LONG
#undef PTR_SIZE_UNDEFINED
#elif (SIZEOF_VOIDP == SIZEOF_LONG_INT)
#define PTR_SIZE_LONG
#undef  PTR_SIZE_INT
#undef PTR_SIZE_UNDEFINED
#else
#define PTR_SIZE_UNDEFINED
#undef PTR_SIZE_INT
#undef PTR_SIZE_LONG
#endif

/* End of added code.  LDF 2009.12.03.  */

I would have liked `configure' to write this to `config.h', but
I don't know how to get it to do it and I don't have time at the
moment to search through the manual to try to find out.

In `main':

/* Added conditionally compiled code.  LDF 2009.12.03.  */

#ifdef PTR_SIZE_LONG
  printf("PTR_SIZE_LONG is defined.\n");   /* Debugging output  */
  gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) ((long) sd));
#else
  printf("PTR_SIZE_LONG is undefined.\n");  /* Debugging output  */
  gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) sd);
#endif

/* End of added conditionally compiled code.  LDF 2009.12.03.  */

There are lots of other places where similar warnings occur.
(I was happy with 32 bit addresses, myself.)


Laurence

Attachment: configure.ac
Description: Binary data

Attachment: ex-client1.c
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]