[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnutls-dev] Re: Compiler warnings on 64bit archs
From: |
Andreas Metzler |
Subject: |
Re: [gnutls-dev] Re: Compiler warnings on 64bit archs |
Date: |
Sat, 24 Jun 2006 14:09:11 +0200 |
User-agent: |
Mutt/1.5.11 |
On 2006-06-16 Andreas Metzler <address@hidden> wrote:
> On 2006-06-16 Simon Josefsson <address@hidden> wrote:
>> Andreas Metzler <address@hidden> writes:
[...]
>>> ------------------------
>>> gnutls_buffers.c:268: warning: cast from pointer to integer of different
>>> size
>>> gnutls_buffers.c:704: warning: cast from pointer to integer of different
>>> size
>> ...
>> Storing integers within pointers is safe, isn't it? Compare:
>> http://developer.gnome.org/doc/API/2.0/glib/glib-Type-Conversion-Macros.html
> I did not know this page. ;-)
> <quote>
> The problem is that on some systems you need to do this:
> p = (void*) (long) 42;
> i = (int) (long) p;
> </quote>
[...]
Attached a small prrof of concept patch showing how this could be
done, eliminating the warnings for gnutls_buffers.c. I have put the
macros in gnutls.h, it might be better to not make them part of the
GnuTLS API, though.
cu andreas
--
The 'Galactic Cleaning' policy undertaken by Emperor Zhark is a personal
vision of the emperor's, and its inclusion in this work does not constitute
tacit approval by the author or the publisher for any such projects,
howsoever undertaken. (c) Jasper Ffforde
50_propercasting.diff
Description: Text document