From 63c5fadcfcd277b0ed7a4de868d002c2b464a536 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Sun, 7 Feb 2021 19:42:40 +0100 Subject: [PATCH] a2dp: fix compiler warnings --- spa/plugins/bluez5/a2dp-source.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spa/plugins/bluez5/a2dp-source.c b/spa/plugins/bluez5/a2dp-source.c index 2eec625e6..28b216cb2 100644 --- a/spa/plugins/bluez5/a2dp-source.c +++ b/spa/plugins/bluez5/a2dp-source.c @@ -450,7 +450,7 @@ static void a2dp_on_ready_read(struct spa_source *source) } if (this->skip_count > 0) { spa_log_info(this->log, NAME " %p: xrun, skipped %"PRIu64" usec", - this, this->skip_count * SPA_USEC_PER_SEC / port->current_format.info.raw.rate); + this, (uint64_t)(this->skip_count * SPA_USEC_PER_SEC / port->current_format.info.raw.rate)); this->skip_count = 0; } @@ -472,7 +472,7 @@ static void a2dp_on_ready_read(struct spa_source *source) datas = buffer->buf->datas; /* copy data into buffer */ - avail = SPA_MIN(decoded, datas[0].maxsize - port->ready_offset); + avail = SPA_MIN(decoded, (int32_t)(datas[0].maxsize - port->ready_offset)); if (avail < decoded) spa_log_warn(this->log, NAME ": buffer too small (%d > %d)", decoded, avail); memcpy ((uint8_t *)datas[0].data + port->ready_offset, read_decoded, avail);