DragonFly BSD
DragonFly commits List (threaded) for 2004-08
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: cvs commit: src/sys/vm vm_extern.h vm_glue.c


From: Joerg Sonnenberger <joerg@xxxxxxxxxxxxxxxxx>
Date: Mon, 16 Aug 2004 07:52:16 +0200

On Sun, Aug 15, 2004 at 12:10:14PM -0700, Matthew Dillon wrote:
>     I think you should probably use 'const caddr_t' there instead of
>     'c_caddr_t'.  I did something similar (typedef'ing const) in FreeBSD a long time
>     ago and it turned out not to be so hot an idea.

Try this:

typedef char *ptr;
const ptr a = "msg";

and use WARNS=6. GCC will warn about discarding a qualifier because 'a'
is a const ptr, not a const char * pointer. That's why the const caddr_t
doesn't give the correct result.

Joerg

> 
> 					-Matt
> 					Matthew Dillon 
> 					<dillon@xxxxxxxxxxxxx>
> 



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