]> git.alsa-project.org Git - alsa-lib.git/commitdiff
fix SNDERR() format strings/arguments
authorClemens Ladisch <clemens@ladisch.de>
Mon, 12 Feb 2007 12:45:57 +0000 (13:45 +0100)
committerClemens Ladisch <clemens@ladisch.de>
Mon, 12 Feb 2007 12:45:57 +0000 (13:45 +0100)
src/confmisc.c
src/mixer/simple_none.c
src/pcm/pcm.c
src/pcm/pcm_direct.c

index 8b80599c5f7e5e9a5549dc8aa22b80f864a68a38..ff22d18949d33c34b38f8c341419605ab07f8fac 100644 (file)
@@ -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)
index 3b190c3997943c8ff0dcbaea1a92021304560dda..9ab2cf06027725205c5352a26e726a3525cc8572 100644 (file)
@@ -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),
index 6c520425db22101284f1f23f20d63a0a406583f7..03d3bd120c194336258c7db52042ac1f872c2a3b 100644 (file)
@@ -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);
index 9f98080ae15200def121fbf5880df481a6e4109e..b4981ab7e04d0bdaadf8d03e0662321d1b414777 100644 (file)
@@ -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;