Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Jun 2010 11:03:09 +0300
From:      Kostik Belousov <kostikbel@gmail.com>
To:        Andriy Gapon <avg@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r209193 - head/sys/dev/sound/pcm
Message-ID:  <20100615080309.GK13238@deviant.kiev.zoral.com.ua>
In-Reply-To: <201006150706.o5F76sLF004481@svn.freebsd.org>
References:  <201006150706.o5F76sLF004481@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--ys8nbMVQRzTucb0g
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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
>=20
> Log:
>   sound/pcm: use non-const string as a value with SYSCTL_STRING
>  =20
>   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.
>  =20
>   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.

--ys8nbMVQRzTucb0g
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (FreeBSD)

iEYEARECAAYFAkwXM70ACgkQC3+MBN1Mb4in3gCfR0ic4KJppz/g6mONIsP7gbLW
uPUAn3k+dw9z5FOfujlyWf9M1xoaCeas
=vn8Z
-----END PGP SIGNATURE-----

--ys8nbMVQRzTucb0g--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100615080309.GK13238>