mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
a set of fixes to reduce gcc warnings
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
345843fc24
commit
7f084af4e4
7 changed files with 13 additions and 9 deletions
|
|
@ -490,6 +490,7 @@ static int pcm_shm_cmd(client_t *client)
|
||||||
case SND_PCM_IOCTL_MMAP:
|
case SND_PCM_IOCTL_MMAP:
|
||||||
{
|
{
|
||||||
ctrl->result = snd_pcm_mmap(pcm);
|
ctrl->result = snd_pcm_mmap(pcm);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case SND_PCM_IOCTL_MUNMAP:
|
case SND_PCM_IOCTL_MUNMAP:
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ autoheader
|
||||||
automake --foreign --copy --add-missing
|
automake --foreign --copy --add-missing
|
||||||
touch depcomp # seems to be missing for old automake
|
touch depcomp # seems to be missing for old automake
|
||||||
autoconf
|
autoconf
|
||||||
export CFLAGS='-O2 -Wall -W -pipe -g'
|
export CFLAGS='-O2 -Wall -W -Wunused-const-variable=0 -pipe -g'
|
||||||
echo "CFLAGS=$CFLAGS"
|
echo "CFLAGS=$CFLAGS"
|
||||||
echo "./configure $args"
|
echo "./configure $args"
|
||||||
./configure $args || exit 1
|
./configure $args || exit 1
|
||||||
|
|
|
||||||
|
|
@ -307,7 +307,9 @@ typedef enum _snd_pcm_state {
|
||||||
SND_PCM_STATE_SUSPENDED,
|
SND_PCM_STATE_SUSPENDED,
|
||||||
/** Hardware is disconnected */
|
/** Hardware is disconnected */
|
||||||
SND_PCM_STATE_DISCONNECTED,
|
SND_PCM_STATE_DISCONNECTED,
|
||||||
SND_PCM_STATE_LAST = SND_PCM_STATE_DISCONNECTED
|
SND_PCM_STATE_LAST = SND_PCM_STATE_DISCONNECTED,
|
||||||
|
/** Private - used internally in the library - do not use*/
|
||||||
|
SND_PCM_STATE_PRIVATE1 = 1024
|
||||||
} snd_pcm_state_t;
|
} snd_pcm_state_t;
|
||||||
|
|
||||||
/** PCM start mode */
|
/** PCM start mode */
|
||||||
|
|
|
||||||
|
|
@ -417,7 +417,7 @@ int snd_pcm_mmap(snd_pcm_t *pcm)
|
||||||
case SND_PCM_AREA_SHM:
|
case SND_PCM_AREA_SHM:
|
||||||
if (i1->u.shm.shmid != i->u.shm.shmid)
|
if (i1->u.shm.shmid != i->u.shm.shmid)
|
||||||
continue;
|
continue;
|
||||||
/* follow thru */
|
/* fall through */
|
||||||
case SND_PCM_AREA_LOCAL:
|
case SND_PCM_AREA_LOCAL:
|
||||||
if (pcm->access != SND_PCM_ACCESS_MMAP_INTERLEAVED &&
|
if (pcm->access != SND_PCM_ACCESS_MMAP_INTERLEAVED &&
|
||||||
pcm->access != SND_PCM_ACCESS_RW_INTERLEAVED)
|
pcm->access != SND_PCM_ACCESS_RW_INTERLEAVED)
|
||||||
|
|
|
||||||
|
|
@ -587,7 +587,7 @@ int snd_pcm_plugin_may_wait_for_avail_min(snd_pcm_t *pcm,
|
||||||
if (available < 0)
|
if (available < 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (available >= pcm->avail_min)
|
if ((snd_pcm_uframes_t)available >= pcm->avail_min)
|
||||||
/* don't wait at all. As we can't configure avail_min
|
/* don't wait at all. As we can't configure avail_min
|
||||||
* of slave to 0 return here
|
* of slave to 0 return here
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -888,7 +888,7 @@ int tplg_add_enum(snd_tplg_t *tplg, struct snd_tplg_enum_template *enum_ctl,
|
||||||
|
|
||||||
if (enum_ctl->values != NULL) {
|
if (enum_ctl->values != NULL) {
|
||||||
for (i = 0; i < num_items; i++) {
|
for (i = 0; i < num_items; i++) {
|
||||||
if (enum_ctl->values[i])
|
if (enum_ctl->values[i] == NULL)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
memcpy(&ec->values[i * sizeof(int) * ENUM_VAL_SIZE],
|
memcpy(&ec->values[i * sizeof(int) * ENUM_VAL_SIZE],
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ struct tplg_elem *lookup_pcm_dai_stream(struct list_head *base, const char* id)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* copy referenced caps to the parent (pcm or be dai) */
|
/* copy referenced caps to the parent (pcm or be dai) */
|
||||||
static void copy_stream_caps(const char *id,
|
static void copy_stream_caps(const char *id ATTRIBUTE_UNUSED,
|
||||||
struct snd_soc_tplg_stream_caps *caps, struct tplg_elem *ref_elem)
|
struct snd_soc_tplg_stream_caps *caps, struct tplg_elem *ref_elem)
|
||||||
{
|
{
|
||||||
struct snd_soc_tplg_stream_caps *ref_caps = ref_elem->stream_caps;
|
struct snd_soc_tplg_stream_caps *ref_caps = ref_elem->stream_caps;
|
||||||
|
|
@ -852,7 +852,8 @@ int tplg_parse_dai(snd_tplg_t *tplg,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* parse physical link runtime supported HW configs in text conf file */
|
/* parse physical link runtime supported HW configs in text conf file */
|
||||||
static int parse_hw_config_refs(snd_tplg_t *tplg, snd_config_t *cfg,
|
static int parse_hw_config_refs(snd_tplg_t *tplg ATTRIBUTE_UNUSED,
|
||||||
|
snd_config_t *cfg,
|
||||||
struct tplg_elem *elem)
|
struct tplg_elem *elem)
|
||||||
{
|
{
|
||||||
struct snd_soc_tplg_link_config *link = elem->link;
|
struct snd_soc_tplg_link_config *link = elem->link;
|
||||||
|
|
@ -1370,7 +1371,7 @@ int tplg_add_pcm_object(snd_tplg_t *tplg, snd_tplg_obj_template_t *t)
|
||||||
static int set_link_hw_config(struct snd_soc_tplg_hw_config *cfg,
|
static int set_link_hw_config(struct snd_soc_tplg_hw_config *cfg,
|
||||||
struct snd_tplg_hw_config_template *tpl)
|
struct snd_tplg_hw_config_template *tpl)
|
||||||
{
|
{
|
||||||
int i;
|
unsigned int i;
|
||||||
|
|
||||||
cfg->size = sizeof(*cfg);
|
cfg->size = sizeof(*cfg);
|
||||||
cfg->id = tpl->id;
|
cfg->id = tpl->id;
|
||||||
|
|
@ -1413,7 +1414,7 @@ int tplg_add_link_object(snd_tplg_t *tplg, snd_tplg_obj_template_t *t)
|
||||||
struct snd_tplg_link_template *link_tpl = t->link;
|
struct snd_tplg_link_template *link_tpl = t->link;
|
||||||
struct snd_soc_tplg_link_config *link, *_link;
|
struct snd_soc_tplg_link_config *link, *_link;
|
||||||
struct tplg_elem *elem;
|
struct tplg_elem *elem;
|
||||||
int i;
|
unsigned int i;
|
||||||
|
|
||||||
if (t->type != SND_TPLG_TYPE_LINK && t->type != SND_TPLG_TYPE_BE
|
if (t->type != SND_TPLG_TYPE_LINK && t->type != SND_TPLG_TYPE_BE
|
||||||
&& t->type != SND_TPLG_TYPE_CC)
|
&& t->type != SND_TPLG_TYPE_CC)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue