svn commit: r209193 - head/sys/dev/sound/pcm

Kostik Belousov kostikbel at gmail.com
Tue Jun 15 08:03:15 UTC 2010


On Tue, Jun 15, 2010 at 07:06:54AM +0000, Andriy Gapon wrote:
> Author: avg
> Date: Tue Jun 15 07:06:54 2010
> New Revision: 209193
> URL: http://svn.freebsd.org/changeset/base/209193
> 
> Log:
>   sound/pcm: use non-const string as a value with SYSCTL_STRING
>   
>   Although the sysctls are marked with CTLFLAG_RD and the values will stay
>   immutable, current sysctl implementation stores value pointer in
>   void* type, which means that const qualifier is discarded anyway
>   and some newer compilers complaint about that.
>   We can't use de-const trick in sysctl implementation, because in that
>   case we could miss an opposite situation where a const value is used
>   with CTLFLAG_RW sysctl.
>   
>   Complaint from:	gcc 4.4, clang
>   MFC after:	2 weeks
This is arguably the change for worse then better.

You could add SYSCTL_STRING_CONST or the like instead.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-head/attachments/20100615/7143d26f/attachment-0001.pgp


More information about the svn-src-head mailing list