[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: FSFS/svn-rep-sharing-stats questions

From: Daniel Widenfalk <Daniel.Widenfalk_at_iar.se>
Date: Tue, 13 Oct 2009 08:30:53 +0200

David Glasser wrote:
> <snip>
>
> Also, I'm not really sure that casting unsigned int<->void* is
> technically well-defined.

Hi all,

Excuse me for barging in like this but as I've got some
cross compiler development background I feel like I could
give you a small nugget of information here.

The cast is well defined but may not work on 64-bit
architectures that define int as a 32 bit type (or any arch
where a (default) pointer is larger than an int). You should
consider using uintptr_t (or intptr_t), which is defined in
<stddef.h>, whenever you need to do freaky stuff with pointers.
Or simply cast to a char * (assuming, of course, that a char
is 8 bits...).

Regards
/Daniel Widenfalk

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2406952
Received on 2009-10-14 02:56:33 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.