From f54f03bfc43a53fb7871a0e376b2fcb9847a27c8 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Mon, 12 Feb 2007 13:45:57 +0100 Subject: [PATCH] fix SNDERR() format strings/arguments --- src/confmisc.c | 6 +++--- src/mixer/simple_none.c | 2 +- src/pcm/pcm.c | 4 ++-- src/pcm/pcm_direct.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/confmisc.c b/src/confmisc.c index 8b80599c..ff22d189 100644 --- a/src/confmisc.c +++ b/src/confmisc.c @@ -671,7 +671,7 @@ int snd_determine_driver(int card, char **driver) assert(card >= 0 && card <= 32); err = open_ctl(card, &ctl); if (err < 0) { - SNDERR("could not open control for card %li", card); + SNDERR("could not open control for card %i", card); goto __error; } snd_ctl_card_info_alloca(&info); @@ -1103,7 +1103,7 @@ int snd_func_pcm_args_by_class(snd_config_t **dst, snd_config_t *root, snd_confi break; err = open_ctl(card, &ctl); if (err < 0) { - SNDERR("could not open control for card %li", card); + SNDERR("could not open control for card %i", card); goto __out; } dev = -1; @@ -1111,7 +1111,7 @@ int snd_func_pcm_args_by_class(snd_config_t **dst, snd_config_t *root, snd_confi while(1) { err = snd_ctl_pcm_next_device(ctl, &dev); if (err < 0) { - SNDERR("could not get next pcm for card %li", card); + SNDERR("could not get next pcm for card %i", card); goto __out; } if (dev < 0) diff --git a/src/mixer/simple_none.c b/src/mixer/simple_none.c index 3b190c39..9ab2cf06 100644 --- a/src/mixer/simple_none.c +++ b/src/mixer/simple_none.c @@ -1702,7 +1702,7 @@ static int simple_add1(snd_mixer_class_t *class, const char *name, snd_mixer_selem_id_free(id); } if (simple->ctls[type].elem) { - SNDERR("helem (%s,'%s',%li,%li,%li) appears twice or more", + SNDERR("helem (%s,'%s',%u,%u,%u) appears twice or more", snd_ctl_elem_iface_name(snd_hctl_elem_get_interface(helem)), snd_hctl_elem_get_name(helem), snd_hctl_elem_get_index(helem), diff --git a/src/pcm/pcm.c b/src/pcm/pcm.c index 6c520425..03d3bd12 100644 --- a/src/pcm/pcm.c +++ b/src/pcm/pcm.c @@ -7155,7 +7155,7 @@ int snd_pcm_set_params(snd_pcm_t *pcm, /* set the count of channels */ err = snd_pcm_hw_params_set_channels(pcm, params, channels); if (err < 0) { - SNDERR("Channels count (%i) not available for %s: %s", s, channels, snd_strerror(err)); + SNDERR("Channels count (%i) not available for %s: %s", channels, s, snd_strerror(err)); return err; } /* set the stream rate */ @@ -7212,7 +7212,7 @@ int snd_pcm_set_params(snd_pcm_t *pcm, period_time = latency / 4; err = INTERNAL(snd_pcm_hw_params_set_period_time_near)(pcm, params, &period_time, NULL); if (err < 0) { - SNDERR("Unable to set period time %i for %s: %s", s, period_time, snd_strerror(err)); + SNDERR("Unable to set period time %i for %s: %s", period_time, s, snd_strerror(err)); return err; } err = INTERNAL(snd_pcm_hw_params_get_period_size)(params, &period_size, NULL); diff --git a/src/pcm/pcm_direct.c b/src/pcm/pcm_direct.c index 9f98080a..b4981ab7 100644 --- a/src/pcm/pcm_direct.c +++ b/src/pcm/pcm_direct.c @@ -1101,7 +1101,7 @@ int snd_pcm_direct_initialize_poll_fd(snd_pcm_direct_t *dmix) } if (snd_timer_poll_descriptors_count(dmix->timer) != 1) { - SNDERR("unable to use timer with fd more than one!!!", name); + SNDERR("unable to use timer '%s' with more than one fd!", name); return ret; } snd_timer_poll_descriptors(dmix->timer, &dmix->timer_fd, 1); @@ -1375,7 +1375,7 @@ int snd_pcm_direct_parse_bindings(snd_pcm_direct_t *dmix, return -EINVAL; } if (schannel < 0 || schannel >= params->channels) { - SNDERR("invalid slave channel number %d in binding to %d", + SNDERR("invalid slave channel number %ld in binding to %ld", schannel, cchannel); free(bindings); return -EINVAL; -- 2.47.1