From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42561) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aamgT-0006qk-Cy for qemu-devel@nongnu.org; Tue, 01 Mar 2016 10:58:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aamgS-0006Lr-2o for qemu-devel@nongnu.org; Tue, 01 Mar 2016 10:58:01 -0500 Received: from mail-qg0-x234.google.com ([2607:f8b0:400d:c04::234]:35881) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aamgR-0006KJ-Vt for qemu-devel@nongnu.org; Tue, 01 Mar 2016 10:58:00 -0500 Received: by mail-qg0-x234.google.com with SMTP id u110so15940466qge.3 for ; Tue, 01 Mar 2016 07:57:59 -0800 (PST) From: Martin Galvan Date: Tue, 1 Mar 2016 12:57:32 -0300 Message-Id: <1456847859-4771-6-git-send-email-martin.galvan@tallertechnologies.com> In-Reply-To: <1456847859-4771-1-git-send-email-martin.galvan@tallertechnologies.com> References: <1456847650-4476-1-git-send-email-martin.galvan@tallertechnologies.com> <1456847859-4771-1-git-send-email-martin.galvan@tallertechnologies.com> Subject: [Qemu-devel] [PATCH v2 06/13] Use unsigned types for the 'len' argument of all memory read/write functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, peter.maydell@linaro.org, pbonzini@redhat.com, edgar.iglesias@gmail.com, rth@twiddle.net, aurelien@aurel32.net, kraxel@redhat.com, blauwirbel@gmail.com, lcapitulino@redhat.com, armbru@redhat.com, afaerber@suse.de, dmitry@daynix.com --- hw/audio/marvell_88w8618.c | 2 +- hw/audio/milkymist-ac97.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/audio/marvell_88w8618.c b/hw/audio/marvell_88w8618.c index a6ca180..c4edf99 100644 --- a/hw/audio/marvell_88w8618.c +++ b/hw/audio/marvell_88w8618.c @@ -64,7 +64,7 @@ static void mv88w8618_audio_callback(void *opaque, int free_out, int free_in) int16_t *codec_buffer; int8_t buf[4096]; int8_t *mem_buffer; - int pos, block_size; + size_t pos, block_size; if (!(s->playback_mode & MP_AUDIO_PLAYBACK_EN)) { return; diff --git a/hw/audio/milkymist-ac97.c b/hw/audio/milkymist-ac97.c index 6a3b536..67639c6 100644 --- a/hw/audio/milkymist-ac97.c +++ b/hw/audio/milkymist-ac97.c @@ -195,7 +195,7 @@ static void ac97_in_cb(void *opaque, int avail_b) } while (temp) { - int acquired, to_copy; + size_t acquired, to_copy; to_copy = audio_MIN(temp, sizeof(buf)); acquired = AUD_read(s->voice_in, buf, to_copy); @@ -238,7 +238,7 @@ static void ac97_out_cb(void *opaque, int free_b) } while (temp) { - int copied, to_copy; + size_t copied, to_copy; to_copy = audio_MIN(temp, sizeof(buf)); cpu_physical_memory_read(addr, buf, to_copy); -- 2.7.1