aboutsummaryrefslogtreecommitdiffstats
path: root/src/audioOutputs/audioOutput_shout.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-02-05 10:17:33 +0000
committerEric Wong <normalperson@yhbt.net>2008-02-05 10:17:33 +0000
commit6fbdc721d972d8c1f823acd5473a3dce8836d5fa (patch)
treee72131541f4e887d5dedd6c75ffce455cbf6b97c /src/audioOutputs/audioOutput_shout.c
parent22efbd5eca4705426af5cee17a65a3e76c33bec6 (diff)
downloadmpd-6fbdc721d972d8c1f823acd5473a3dce8836d5fa.tar.gz
mpd-6fbdc721d972d8c1f823acd5473a3dce8836d5fa.tar.xz
mpd-6fbdc721d972d8c1f823acd5473a3dce8836d5fa.zip
fix -Wconst warnings
[ew: cleaned up the dirty union hack a bit] Signed-off-by: Eric Wong <normalperson@yhbt.net> git-svn-id: https://svn.musicpd.org/mpd/trunk@7180 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/audioOutputs/audioOutput_shout.c')
-rw-r--r--src/audioOutputs/audioOutput_shout.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/audioOutputs/audioOutput_shout.c b/src/audioOutputs/audioOutput_shout.c
index 236e02b76..beacfeef9 100644
--- a/src/audioOutputs/audioOutput_shout.c
+++ b/src/audioOutputs/audioOutput_shout.c
@@ -116,7 +116,7 @@ static int myShout_initDriver(AudioOutput * audioOutput, ConfigParam * param)
char *host;
char *mount;
char *passwd;
- char *user;
+ const char *user;
char *name;
BlockParam *blockParam;
int public;
@@ -388,8 +388,13 @@ static void myShout_closeDevice(AudioOutput * audioOutput)
audioOutput->open = 0;
}
-#define addTag(name, value) { \
- if(value) vorbis_comment_add_tag(&(sd->vc), name, value); \
+static void addTag(ShoutData *sd, const char *name, char *value)
+{
+ if (value) {
+ union const_hack u;
+ u.in = name;
+ vorbis_comment_add_tag(&(sd->vc), u.out, value);
+ }
}
static void copyTagToVorbisComment(ShoutData * sd)
@@ -400,13 +405,13 @@ static void copyTagToVorbisComment(ShoutData * sd)
for (i = 0; i < sd->tag->numOfItems; i++) {
switch (sd->tag->items[i].type) {
case TAG_ITEM_ARTIST:
- addTag("ARTIST", sd->tag->items[i].value);
+ addTag(sd, "ARTIST", sd->tag->items[i].value);
break;
case TAG_ITEM_ALBUM:
- addTag("ALBUM", sd->tag->items[i].value);
+ addTag(sd, "ALBUM", sd->tag->items[i].value);
break;
case TAG_ITEM_TITLE:
- addTag("TITLE", sd->tag->items[i].value);
+ addTag(sd, "TITLE", sd->tag->items[i].value);
break;
}
}