From cbe7907f46ce9dcd73be392f6660c76767ce3c99 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Tue, 23 Oct 2018 08:49:23 +0200 Subject: [PATCH] pcm_usb_stream: fix signess issues Signed-off-by: Jaroslav Kysela --- usb_stream/pcm_usb_stream.c | 4 ++-- usb_stream/usb_stream.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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; -- 2.47.1