From owner-cvs-all Thu Jan 16 10:41:50 2003 Delivered-To: cvs-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 931) id 04E9437B409; Thu, 16 Jan 2003 10:41:49 -0800 (PST) Date: Thu, 16 Jan 2003 10:41:48 -0800 From: Juli Mallett To: Nate Lawson Cc: Bruce Evans , Hidetoshi Shimokawa , 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> References: <20030117052637.I3675-100000@gamplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from nate@root.org on Thu, Jan 16, 2003 at 10:38:07AM -0800 Organisation: The FreeBSD Project X-Alternate-Addresses: , , , , X-Towel: Yes X-LiveJournal: flata, jmallett X-Negacore: Yes Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * De: Nate Lawson [ 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 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