Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Jan 2003 10:41:48 -0800
From:      Juli Mallett <jmallett@FreeBSD.org>
To:        Nate Lawson <nate@root.org>
Cc:        Bruce Evans <bde@zeta.org.au>, Hidetoshi Shimokawa <simokawa@FreeBSD.org>, cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org
Subject:   Re: cvs commit: src/sys/dev/firewire firewire.c fwdev.c fwohci.c fwohcivar.h
Message-ID:  <20030116104148.A94200@FreeBSD.org>
In-Reply-To: <Pine.BSF.4.21.0301161036320.46845-100000@root.org>; from nate@root.org on Thu, Jan 16, 2003 at 10:38:07AM -0800
References:  <20030117052637.I3675-100000@gamplex.bde.org> <Pine.BSF.4.21.0301161036320.46845-100000@root.org>

next in thread | previous in thread | raw e-mail | index | archive | help
* De: Nate Lawson <nate@root.org> [ Data: 2003-01-16 ]
	[ Subjecte: Re: cvs commit: src/sys/dev/firewire firewire.c fwdev.c fwohci.c fwohcivar.h ]
> On Fri, 17 Jan 2003, Bruce Evans wrote:
> > On Thu, 16 Jan 2003, Nate Lawson wrote:
> > 
> > > > -		contigfree((void *)(uintptr_t)sc->fc.sid_buf,
> > > > -					OHCI_SIDSIZE, M_DEVBUF);
> > > > +		free((void *)(uintptr_t)sc->fc.sid_buf, M_DEVBUF);
> > >
> > > Unnecessary casts (there are others).
> > 
> > Er, these casts seem to be necessary to break warnings from -Wcast-qual.
> > sid_buf has type "volatile u_int32_t *".
> 
> Yes, I've had to discard volatile also (when dealing with freeing an
> aio_buf).  I'm interested why it can't be cast directly to (void *).  Why
> the indirection through unitptr_t?

To discard a qualifier without the compiler telling you it's dangerous.
-- 
Juli Mallett <jmallett@FreeBSD.org>
AIM: BSDFlata -- IRC: juli on EFnet.
OpenDarwin, Mono, FreeBSD Developer.
ircd-hybrid Developer, EFnet addict.
FreeBSD on MIPS-Anything on FreeBSD.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030116104148.A94200>