From: Jaroslav Kysela Date: Tue, 23 Oct 2018 06:49:23 +0000 (+0200) Subject: pcm_usb_stream: fix signess issues X-Git-Tag: v1.1.8~20 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=cbe7907f46ce9dcd73be392f6660c76767ce3c99;p=alsa-plugins.git pcm_usb_stream: fix signess issues Signed-off-by: Jaroslav Kysela --- diff --git a/usb_stream/pcm_usb_stream.c b/usb_stream/pcm_usb_stream.c index 6d08c37..3f74aba 100644 --- a/usb_stream/pcm_usb_stream.c +++ b/usb_stream/pcm_usb_stream.c @@ -300,9 +300,9 @@ static snd_pcm_sframes_t snd_pcm_us_write(snd_pcm_ioplug_t *io, static int usb_stream_read(struct user_usb_stream *uus, void *to) { struct usb_stream *s = uus->s; - int p = s->inpacket_split, l = 0; + unsigned p = s->inpacket_split, l = 0; void *i = (void *)s + s->inpacket[p].offset + s->inpacket_split_at; - int il = s->inpacket[p].length - s->inpacket_split_at; + unsigned il = s->inpacket[p].length - s->inpacket_split_at; do { if (l + il > s->period_size) diff --git a/usb_stream/usb_stream.h b/usb_stream/usb_stream.h index 4dd74ab..96f8d9e 100644 --- a/usb_stream/usb_stream.h +++ b/usb_stream/usb_stream.h @@ -39,7 +39,7 @@ struct usb_stream { unsigned read_size; unsigned write_size; - int period_size; + unsigned period_size; unsigned state;