Source-Changes archive

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

Re: CVS commit: src/sys/rump/librump



On Thu Nov 08 2007 at 07:33:29 +0000, Tom Spindler wrote:
> On Wed, Nov 07, 2007 at 06:59:19PM +0000, Antti Kantee wrote:
> > 
> > Module Name:        src
> > Committed By:       pooka
> > Date:               Wed Nov  7 18:59:19 UTC 2007
> > 
> > Modified Files:
> >     src/sys/rump/librump/rumpuser: rumpuser_pth.c
> > 
> 
> This breaks horribly on 64-bit platforms, where "int" may not be what you
> think it is. The casts here, there, and everywhere to (int) kinda worry me,
> too.
> 
> /home/dogcow/work/nbsrc/sys/rump/librump/rumpuser/rumpuser_pth.c: In function 
> 'rumpuser_set_ipl':
> /home/dogcow/work/nbsrc/sys/rump/librump/rumpuser/rumpuser_pth.c:286: 
> warning: cast from pointer to integer of different size
> /home/dogcow/work/nbsrc/sys/rump/librump/rumpuser/rumpuser_pth.c:287: 
> warning: cast to pointer from integer of different size
> /home/dogcow/work/nbsrc/sys/rump/librump/rumpuser/rumpuser_pth.c: In function 
> 'rumpuser_whatis_ipl':
> /home/dogcow/work/nbsrc/sys/rump/librump/rumpuser/rumpuser_pth.c:295: 
> warning: cast from pointer to integer of different size
> /home/dogcow/work/nbsrc/sys/rump/librump/rumpuser/rumpuser_pth.c: In function 
> 'rumpuser_clear_ipl':
> /home/dogcow/work/nbsrc/sys/rump/librump/rumpuser/rumpuser_pth.c:306: 
> warning: cast from pointer to integer of different size
> /home/dogcow/work/nbsrc/sys/rump/librump/rumpuser/rumpuser_pth.c:309: 
> warning: cast to pointer from integer of different size

If you read the code, you'll see it's used as a counter, so nothing to
worry about.

Try adding a cast to (intptr_t) around the (int) if you can compile-test
immediately (it's going to take a while for me to build amd64).

-- 
Antti Kantee <pooka%iki.fi@localhost>                     Of course he runs 
NetBSD
http://www.iki.fi/pooka/                          http://www.NetBSD.org/
    "la qualité la plus indispensable du cuisinier est l'exactitude"



Home | Main Index | Thread Index | Old Index