diff options
author | Max Kellermann <max@duempel.org> | 2008-02-05 10:17:33 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-02-05 10:17:33 +0000 |
commit | 6fbdc721d972d8c1f823acd5473a3dce8836d5fa (patch) | |
tree | e72131541f4e887d5dedd6c75ffce455cbf6b97c /src/volume.c | |
parent | 22efbd5eca4705426af5cee17a65a3e76c33bec6 (diff) | |
download | mpd-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 '')
-rw-r--r-- | src/volume.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/volume.c b/src/volume.c index 736838139..846a76eaa 100644 --- a/src/volume.c +++ b/src/volume.c @@ -57,7 +57,7 @@ #endif static int volume_mixerType = VOLUME_MIXER_TYPE_DEFAULT; -static char *volume_mixerDevice = VOLUME_MIXER_DEVICE_DEFAULT; +static const char *volume_mixerDevice = VOLUME_MIXER_DEVICE_DEFAULT; static int volume_softwareSet = 100; @@ -82,7 +82,7 @@ static void closeOssMixer(void) volume_ossFd = -1; } -static int prepOssMixer(char *device) +static int prepOssMixer(const char *device) { ConfigParam *param; @@ -94,7 +94,7 @@ static int prepOssMixer(char *device) param = getConfigParam(CONF_MIXER_CONTROL); if (param) { - char *labels[SOUND_MIXER_NRDEVICES] = SOUND_DEVICE_LABELS; + const char *labels[SOUND_MIXER_NRDEVICES] = SOUND_DEVICE_LABELS; char *duplicated; int i, j; int devmask = 0; @@ -211,11 +211,11 @@ static void closeAlsaMixer(void) volume_alsaMixerHandle = NULL; } -static int prepAlsaMixer(char *card) +static int prepAlsaMixer(const char *card) { int err; snd_mixer_elem_t *elem; - char *controlName = VOLUME_MIXER_ALSA_CONTROL_DEFAULT; + const char *controlName = VOLUME_MIXER_ALSA_CONTROL_DEFAULT; ConfigParam *param; err = snd_mixer_open(&volume_alsaMixerHandle, 0); @@ -370,7 +370,7 @@ static int changeAlsaVolumeLevel(int fd, int change, int rel) } #endif -static int prepMixer(char *device) +static int prepMixer(const char *device) { switch (volume_mixerType) { #ifdef HAVE_ALSA |