Commit f8b6c0cf authored by Takashi Iwai's avatar Takashi Iwai

ALSA: pcm: Fix sparse warning wrt PCM format type

The PCM format type is with __bitwise, hence it needs the explicit
cast with __force.  It's ugly, but there is a reason for that cost...

This fixes the sparse warning:
  sound/core/oss/pcm_oss.c:1854:55: warning: incorrect type in argument 1 (different base types)
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 94dfee0c
...@@ -1851,7 +1851,7 @@ static int snd_pcm_oss_get_formats(struct snd_pcm_oss_file *pcm_oss_file) ...@@ -1851,7 +1851,7 @@ static int snd_pcm_oss_get_formats(struct snd_pcm_oss_file *pcm_oss_file)
format_mask = hw_param_mask_c(params, SNDRV_PCM_HW_PARAM_FORMAT); format_mask = hw_param_mask_c(params, SNDRV_PCM_HW_PARAM_FORMAT);
for (fmt = 0; fmt < 32; ++fmt) { for (fmt = 0; fmt < 32; ++fmt) {
if (snd_mask_test(format_mask, fmt)) { if (snd_mask_test(format_mask, fmt)) {
int f = snd_pcm_oss_format_to(fmt); int f = snd_pcm_oss_format_to((__force snd_pcm_format_t)fmt);
if (f >= 0) if (f >= 0)
formats |= f; formats |= f;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment