]> git.alsa-project.org Git - alsa-lib.git/commitdiff
pcm: Fix incompatible-pointer-type warnings
authorCezary Rojewski <cezary.rojewski@intel.com>
Fri, 4 Aug 2023 08:20:33 +0000 (10:20 +0200)
committerJaroslav Kysela <perex@perex.cz>
Fri, 8 Dec 2023 19:03:51 +0000 (20:03 +0100)
Update snd_pcm_subformat_t getters and setters so they no longer throw
warnings when building.

Closes: https://github.com/alsa-project/alsa-lib/pull/342
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/pcm/pcm.c

index 4bb5c759930e49de6df7cee8407b3b2e0ddf84ae..dc59c50d0af7621796bbe3b7440fac8fbc6e7145 100644 (file)
@@ -4495,7 +4495,7 @@ EXPORT_SYMBOL int INTERNAL(snd_pcm_hw_params_get_subformat)(const snd_pcm_hw_par
 int snd_pcm_hw_params_get_subformat(const snd_pcm_hw_params_t *params, snd_pcm_subformat_t *subformat)
 #endif
 {
-       return snd_pcm_hw_param_get(params, SND_PCM_HW_PARAM_SUBFORMAT, subformat, NULL);
+       return snd_pcm_hw_param_get(params, SND_PCM_HW_PARAM_SUBFORMAT, (unsigned int *)subformat, NULL);
 }
 
 /**
@@ -4535,7 +4535,7 @@ EXPORT_SYMBOL int INTERNAL(snd_pcm_hw_params_set_subformat_first)(snd_pcm_t *pcm
 int snd_pcm_hw_params_set_subformat_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_subformat_t *subformat)
 #endif
 {
-       return snd_pcm_hw_param_set_first(pcm, params, SND_PCM_HW_PARAM_SUBFORMAT, subformat, NULL);
+       return snd_pcm_hw_param_set_first(pcm, params, SND_PCM_HW_PARAM_SUBFORMAT, (unsigned int *)subformat, NULL);
 }
 
 /**
@@ -4551,7 +4551,7 @@ EXPORT_SYMBOL int INTERNAL(snd_pcm_hw_params_set_subformat_last)(snd_pcm_t *pcm,
 int snd_pcm_hw_params_set_subformat_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_subformat_t *subformat)
 #endif
 {
-       return snd_pcm_hw_param_set_last(pcm, params, SND_PCM_HW_PARAM_SUBFORMAT, subformat, NULL);
+       return snd_pcm_hw_param_set_last(pcm, params, SND_PCM_HW_PARAM_SUBFORMAT, (unsigned int *)subformat, NULL);
 }
 
 /**