aboutsummaryrefslogtreecommitdiffstats
path: root/src/audioOutputs/audioOutput_shout.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-07 19:14:39 +0200
committerEric Wong <normalperson@yhbt.net>2008-09-09 01:28:10 -0700
commitd5187ce694cca1c5bd05bd562d9494e7387a86d0 (patch)
tree39a98b79bf15922b0a5a0a8424350f1cca00db9e /src/audioOutputs/audioOutput_shout.c
parent56c11abbf5a5a6e7b53905f91fda1ba75b02b296 (diff)
downloadmpd-d5187ce694cca1c5bd05bd562d9494e7387a86d0.tar.gz
mpd-d5187ce694cca1c5bd05bd562d9494e7387a86d0.tar.xz
mpd-d5187ce694cca1c5bd05bd562d9494e7387a86d0.zip
fix -Wcast-qual -Wwrite-strings warnings
The previous patch enabled these warnings. In Eric's branch, they were worked around with a generic deconst_ptr() function. There are several places where we can add "const" to pointers, and in others, libraries want non-const strings. In the latter, convert string literals to "static char[]" variables - this takes the same space, and seems safer than deconsting a string literal.
Diffstat (limited to 'src/audioOutputs/audioOutput_shout.c')
-rw-r--r--src/audioOutputs/audioOutput_shout.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/audioOutputs/audioOutput_shout.c b/src/audioOutputs/audioOutput_shout.c
index b65a8253f..2ee942809 100644
--- a/src/audioOutputs/audioOutput_shout.c
+++ b/src/audioOutputs/audioOutput_shout.c
@@ -636,8 +636,8 @@ static int myShout_play(AudioOutput * audioOutput,
for (i = 0; i < samples; i++) {
for (j = 0; j < sd->audioFormat->channels; j++) {
- vorbbuf[j][i] =
- (*((mpd_sint16 *)deconst_ptr(playChunk))) / 32768.0;
+ vorbbuf[j][i] = (*((const mpd_sint16 *) playChunk))
+ / 32768.0;
playChunk += bytes;
}
}