summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound/pcm/feeder_rate.c
diff options
context:
space:
mode:
authoravg <avg@FreeBSD.org>2010-06-15 07:06:54 +0000
committeravg <avg@FreeBSD.org>2010-06-15 07:06:54 +0000
commitb3f689911f5a6573e4b49b1c7f7d3d8587d4aae5 (patch)
treed1532ffb12065cf4ae143bd65a809056ad58d178 /sys/dev/sound/pcm/feeder_rate.c
parentf630934da70d4d34df892850a43110f60f7b2926 (diff)
downloadFreeBSD-src-b3f689911f5a6573e4b49b1c7f7d3d8587d4aae5.zip
FreeBSD-src-b3f689911f5a6573e4b49b1c7f7d3d8587d4aae5.tar.gz
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
Diffstat (limited to 'sys/dev/sound/pcm/feeder_rate.c')
-rw-r--r--sys/dev/sound/pcm/feeder_rate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/sound/pcm/feeder_rate.c b/sys/dev/sound/pcm/feeder_rate.c
index 9e8813f..cb30dd9 100644
--- a/sys/dev/sound/pcm/feeder_rate.c
+++ b/sys/dev/sound/pcm/feeder_rate.c
@@ -159,7 +159,7 @@ int feeder_rate_quality = Z_QUALITY_DEFAULT;
static int feeder_rate_polyphase_max = Z_POLYPHASE_MAX;
#ifdef _KERNEL
-static const char feeder_rate_presets[] = FEEDER_RATE_PRESETS;
+static char feeder_rate_presets[] = FEEDER_RATE_PRESETS;
SYSCTL_STRING(_hw_snd, OID_AUTO, feeder_rate_presets, CTLFLAG_RD,
&feeder_rate_presets, 0, "compile-time rate presets");
OpenPOWER on IntegriCloud