Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys/dev/i2c
On Jul 28, 2012, at 10:52 PM, David Holland wrote:
> 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.
No, it's passing void * which is ignoring, not discarding, the
'const foo *' and just using the last * which does not have a
const qualifier (if it did, it would const foo * const *).
Home |
Main Index |
Thread Index |
Old Index