From patchwork Fri May 13 10:44:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Leon Alrae X-Patchwork-Id: 621926 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 3r5mhx1DnHz9t6s for ; Fri, 13 May 2016 20:45:21 +1000 (AEST) Received: from localhost ([::1]:33845 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b1Aat-0006E4-3z for incoming@patchwork.ozlabs.org; Fri, 13 May 2016 06:45:19 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43568) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b1AaN-0004xQ-BO for qemu-devel@nongnu.org; Fri, 13 May 2016 06:44:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b1AaK-0000GF-Oz for qemu-devel@nongnu.org; Fri, 13 May 2016 06:44:46 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:33229) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b1AaK-0000G9-I4; Fri, 13 May 2016 06:44:44 -0400 Received: from hhmail02.hh.imgtec.org (unknown [10.100.10.20]) by Websense Email with ESMTPS id 13188F209F29B; Fri, 13 May 2016 11:44:40 +0100 (IST) Received: from localhost.localdomain (192.168.161.74) by hhmail02.hh.imgtec.org (10.100.10.20) with Microsoft SMTP Server (TLS) id 14.3.266.1; Fri, 13 May 2016 11:44:43 +0100 From: Leon Alrae To: Date: Fri, 13 May 2016 11:44:16 +0100 Message-ID: <1463136257-46914-2-git-send-email-leon.alrae@imgtec.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1463136257-46914-1-git-send-email-leon.alrae@imgtec.com> References: <1463136257-46914-1-git-send-email-leon.alrae@imgtec.com> MIME-Version: 1.0 X-Originating-IP: [192.168.161.74] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 195.59.15.196 Subject: [Qemu-devel] [PULL 1/2] target-mips: fix call to memset in soft reset code 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: , Cc: Stefan Weil , qemu-stable@nongnu.org, Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Aurelien Jarno Recent versions of GCC report the following error when compiling target-mips/helper.c: qemu/target-mips/helper.c:542:9: warning: ‘memset’ used with length equal to number of elements without multiplication by element size [-Wmemset-elt-size] This is indeed correct and due to a wrong usage of sizeof(). Fix that. Cc: Stefan Weil Cc: Leon Alrae Cc: qemu-stable@nongnu.org LP: https://bugs.launchpad.net/qemu/+bug/1577841 Signed-off-by: Aurelien Jarno Reviewed-by: Stefan Weil Reviewed-by: Leon Alrae Signed-off-by: Leon Alrae --- target-mips/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-mips/helper.c b/target-mips/helper.c index 1004ede..cfea177 100644 --- a/target-mips/helper.c +++ b/target-mips/helper.c @@ -539,7 +539,7 @@ void mips_cpu_do_interrupt(CPUState *cs) break; case EXCP_SRESET: env->CP0_Status |= (1 << CP0St_SR); - memset(env->CP0_WatchLo, 0, sizeof(*env->CP0_WatchLo)); + memset(env->CP0_WatchLo, 0, sizeof(env->CP0_WatchLo)); goto set_error_EPC; case EXCP_NMI: env->CP0_Status |= (1 << CP0St_NMI);