alsa: hide a few compiler warnings
This commit is contained in:
parent
58330ab892
commit
cdbc51d97d
|
@ -78,7 +78,7 @@ static int hw_opendev(int device_index)
|
||||||
struct alsa *alsa;
|
struct alsa *alsa;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
if (!(sdi = get_sigrok_device_instance(device_instances, 0)))
|
if (!(sdi = get_sigrok_device_instance(device_instances, device_index)))
|
||||||
return SIGROK_ERR;
|
return SIGROK_ERR;
|
||||||
alsa = sdi->priv;
|
alsa = sdi->priv;
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ static void hw_closedev(int device_index)
|
||||||
struct sigrok_device_instance *sdi;
|
struct sigrok_device_instance *sdi;
|
||||||
struct alsa *alsa;
|
struct alsa *alsa;
|
||||||
|
|
||||||
if (!(sdi = get_sigrok_device_instance(device_instances, 0)))
|
if (!(sdi = get_sigrok_device_instance(device_instances, device_index)))
|
||||||
return;
|
return;
|
||||||
alsa = sdi->priv;
|
alsa = sdi->priv;
|
||||||
if (!alsa)
|
if (!alsa)
|
||||||
|
@ -211,6 +211,9 @@ static int receive_data(int fd, int revents, void *user_data)
|
||||||
char inb[4096];
|
char inb[4096];
|
||||||
int i, x, count;
|
int i, x, count;
|
||||||
|
|
||||||
|
fd = fd;
|
||||||
|
revents = revents;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
memset(inb, 0, sizeof(inb));
|
memset(inb, 0, sizeof(inb));
|
||||||
count = snd_pcm_readi(alsa->capture_handle, inb,
|
count = snd_pcm_readi(alsa->capture_handle, inb,
|
||||||
|
|
Loading…
Reference in New Issue