Subject: Re: CVS commit: src/sys/rump/librump
To: Tom Spindler <dogcow@NetBSD.org>
From: Antti Kantee <pooka@netbsd.org>
List: source-changes
Date: 11/08/2007 12:10:42
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>                     Of course he runs NetBSD
http://www.iki.fi/pooka/                          http://www.NetBSD.org/
    "la qualité la plus indispensable du cuisinier est l'exactitude"