From 99f5fef0ea5671d41fb7b737fbc3e4236542a757 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 10 Jun 2014 23:56:05 +0200 Subject: Add more const While I'm not very fond of "const", it's important for declarations (it decides whether a symbol is emitted in a read-only or read/write section). Fix all these cases, so we have writeable global data only when we really need. --- audio/out/ao_oss.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'audio/out/ao_oss.c') diff --git a/audio/out/ao_oss.c b/audio/out/ao_oss.c index 545ddca3f8..7698af4e0c 100644 --- a/audio/out/ao_oss.c +++ b/audio/out/ao_oss.c @@ -65,7 +65,7 @@ struct priv { char *cfg_oss_mixer_channel; }; -static const char *mixer_channels[SOUND_MIXER_NRDEVICES] = SOUND_DEVICE_NAMES; +static const char *const mixer_channels[SOUND_MIXER_NRDEVICES] = SOUND_DEVICE_NAMES; /* like alsa except for 6.1 and 7.1, from pcm/matrix_map.h */ static const struct mp_chmap oss_layouts[MP_NUM_CHANNELS + 1] = { @@ -80,7 +80,7 @@ static const struct mp_chmap oss_layouts[MP_NUM_CHANNELS + 1] = { MP_CHMAP8(FL, FR, BL, BR, FC, LFE, SL, SR), // 7.1 }; -static int format_table[][2] = { +static const int format_table[][2] = { {AFMT_U8, AF_FORMAT_U8}, {AFMT_S8, AF_FORMAT_S8}, {AFMT_U16_LE, AF_FORMAT_U16_LE}, -- cgit v1.2.3