]> sigrok.org Git - libsigrok.git/commitdiff
alsa: hide a few compiler warnings
authorDaniel Ribeiro <redacted>
Sat, 22 Jan 2011 14:23:34 +0000 (12:23 -0200)
committerDaniel Ribeiro <redacted>
Sat, 22 Jan 2011 14:24:12 +0000 (12:24 -0200)
hardware/alsa/alsa.c

index b41d8ed3536714f83e5a2fb695c3801e538c72e7..e4cab1e0ca00ab919081561ead201161005c8efc 100644 (file)
@@ -78,7 +78,7 @@ static int hw_opendev(int device_index)
        struct alsa *alsa;
        int err;
 
-       if (!(sdi = get_sigrok_device_instance(device_instances, 0)))
+       if (!(sdi = get_sigrok_device_instance(device_instances, device_index)))
                return SIGROK_ERR;
        alsa = sdi->priv;
 
@@ -112,7 +112,7 @@ static void hw_closedev(int device_index)
        struct sigrok_device_instance *sdi;
        struct alsa *alsa;
 
-       if (!(sdi = get_sigrok_device_instance(device_instances, 0)))
+       if (!(sdi = get_sigrok_device_instance(device_instances, device_index)))
                return;
        alsa = sdi->priv;
        if (!alsa)
@@ -211,6 +211,9 @@ static int receive_data(int fd, int revents, void *user_data)
        char inb[4096];
        int i, x, count;
 
+       fd = fd;
+       revents = revents;
+
        do {
                memset(inb, 0, sizeof(inb));
                count = snd_pcm_readi(alsa->capture_handle, inb,