On Jul 28, 2012, at 9:29 PM, David Holland wrote: > On Sat, Jul 28, 2012 at 11:03:47PM +0000, Matt Thomas wrote: >> Modified Files: >> src/sys/dev/i2c: g760a.c >> >> Log Message: >> Use (void *) instead of (type **) which gcc complains about. > > At least one of these casts is discarding const and writing to the > const object returned by sysctl_createv().
const foo ** is not pointer to const, it's a pointer to a pointer to const. so void * does not discard const. > It looks as if the const annotations in kern_sysctlc are rubbish. > Can anyone explain what the model is supposed to be? Not a clue.