caddr_t or void *

RW list-freebsd-2004 at morbius.sent.com
Thu Aug 10 14:16:39 UTC 2006


On Thursday 10 August 2006 14:56, Chuck Swiger wrote:
> Only OpenSource wrote:
> > caddr_t which is a typedef for char* seems to be used quite often in
> > the kernel code.  Would void* be preferable to caddr_t ?
>
> No.  Having to cast (void *)'s to the actual data type every time you
> dereference them would be highly annoying.

My C's a bit rusty, but isn't it the other way around. You don't need to cast  
(void *) so it suppresses useful type warnings.


More information about the freebsd-questions mailing list