On Sat, Jul 28, 2012 at 10:22:46PM -0700, 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 does; it's passing foo ** to a const foo ** argument and thereby
discarding the const on the returned pointer.

 > > It looks as if the const annotations in kern_sysctl.c are rubbish.
 > > Can anyone explain what the model is supposed to be?
 > 
 > Not a clue.

question stands.

-- 
David A. Holland
dholl...@netbsd.org

Reply via email to