On Mon, 21 Jun 2010 01:23:15 +0900 Brett Nash <n...@nash.id.au> said:

> On Sun, 20 Jun 2010 19:47:41 +0900
> Carsten Haitzler (The Rasterman) <ras...@rasterman.com> wrote:
> > > I found another warning which needs attention and is likely to cause
> > > problems on 64-bit systems and is probably not visible on a 32-bit
> > > system. It might be related or not, but certainly a potential source
> > > for segfaults.
> > > 
> > > In e/src/modules/comp/e_mod_config.c
> > > e_mod_config.c: In function '_style_demo':
> > > e_mod_config.c:246: warning: cast from pointer to integer of
> > > different size e_mod_config.c:248: warning: cast to pointer from
> > > integer of different size
> > > 
> > > It's the only one of this kind for enlightenment and all it's
> > > dependencies.
> > 
> > it's safe. i knew i was casting a pointer. it will be fine on any
> > number of bits :) (32,, 64.. or more).
> 
> Maybe cast the pointer<->integer through a intptr_t or a uintptr_t?
> A little uglier, but it gets rid of all the size warnings on any size
> arch.
>       int foo = (int)(intptr_t)voidthingy;
> 
> Also avoids mailing list posts on the topic, which is even better ;-)

i am wary of these intprt_t's, uint32_t's etc. etc. - i was bitten by these
before years ago where on some systems they didn't exist, others they did, so i
just avoided them. as such in this gase gcc is bitching even WITH an explcit
case. i could nest it with void * -> unsigned long -> int as that'd shut gcc up
but it'd be the exact identical result in the end


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    ras...@rasterman.com


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to