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

Joerg Sonnenberger joerg at britannica.bec.de
Sun Aug 15 22:54:38 PDT 2004


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 at xxxxxxxxxxxxx>
> 





More information about the Commits mailing list