From patchwork Mon May 1 07:39:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mark Cave-Ayland X-Patchwork-Id: 756999 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wGbv60QSSz9sCZ for ; Mon, 1 May 2017 17:40:50 +1000 (AEST) Received: from localhost ([::1]:47185 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d55wt-0001uX-F1 for incoming@patchwork.ozlabs.org; Mon, 01 May 2017 03:40:47 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58559) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d55wI-0001rT-GU for qemu-devel@nongnu.org; Mon, 01 May 2017 03:40:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d55wG-0003iM-HO for qemu-devel@nongnu.org; Mon, 01 May 2017 03:40:10 -0400 Received: from chuckie.co.uk ([82.165.15.123]:56768 helo=s16892447.onlinehome-server.info) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d55wG-0003gh-Ai for qemu-devel@nongnu.org; Mon, 01 May 2017 03:40:08 -0400 Received: from host109-152-9-108.range109-152.btcentralplus.com ([109.152.9.108] helo=kentang.home) by s16892447.onlinehome-server.info with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1d55wC-00066X-2c; Mon, 01 May 2017 08:40:05 +0100 From: Mark Cave-Ayland To: qemu-devel@nongnu.org, peter.maydell@linaro.org, kraxel@redhat.com Date: Mon, 1 May 2017 08:39:35 +0100 Message-Id: <1493624375-12707-3-git-send-email-mark.cave-ayland@ilande.co.uk> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1493624375-12707-1-git-send-email-mark.cave-ayland@ilande.co.uk> References: <1493624375-12707-1-git-send-email-mark.cave-ayland@ilande.co.uk> X-SA-Exim-Connect-IP: 109.152.9.108 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk X-SA-Exim-Version: 4.2.1 (built Sun, 08 Jan 2012 02:45:44 +0000) X-SA-Exim-Scanned: Yes (on s16892447.onlinehome-server.info) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 82.165.15.123 Subject: [Qemu-devel] [PATCH 2/2] cg3: add explicit ram_addr_t cast to scanline page variable X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Coverity warns that multiplying two 32-bit values gives a 32-bit result which is assigned to a 64-bit variable. Add an explicit ram_addr_t cast to silence the warning. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/display/cg3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/display/cg3.c b/hw/display/cg3.c index 03d9197..7ef8a96 100644 --- a/hw/display/cg3.c +++ b/hw/display/cg3.c @@ -113,7 +113,7 @@ static void cg3_update_display(void *opaque) for (y = 0; y < height; y++) { int update = s->full_update; - page = y * width; + page = (ram_addr_t)y * width; update |= memory_region_get_dirty(&s->vram_mem, page, width, DIRTY_MEMORY_VGA); if (update) {