From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56775) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axhbw-0001bt-F6 for qemu-devel@nongnu.org; Tue, 03 May 2016 17:12:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1axhbk-0007YM-Ji for qemu-devel@nongnu.org; Tue, 03 May 2016 17:11:59 -0400 Received: from hall.aurel32.net ([2001:bc8:30d7:100::1]:51204) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axhbk-0007TD-Dr for qemu-devel@nongnu.org; Tue, 03 May 2016 17:11:52 -0400 Date: Tue, 3 May 2016 23:11:31 +0200 From: Aurelien Jarno Message-ID: <20160503211130.GA8896@aurel32.net> References: <20160503155857.23801.56272.malonedeb@gac.canonical.com> <5728E9C4.4060706@weilnetz.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <5728E9C4.4060706@weilnetz.de> Subject: Re: [Qemu-devel] [Bug 1577841] [NEW] target-mips/helper.c:542: bad sizeof ? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: Bug 1577841 <1577841@bugs.launchpad.net>, qemu-devel@nongnu.org On 2016-05-03 20:11, Stefan Weil wrote: > Am 03.05.2016 um 17:58 schrieb dcb: > > Public bug reported: > > > > Recent versions of gcc say this: > > > > qemu/target-mips/helper.c:542:9: warning: =E2=80=98memset=E2=80=99 used= with length > > equal to number of elements without multiplication by element size > > [-Wmemset-elt-size] > > > > Source code is > > > > memset(env->CP0_WatchLo, 0, sizeof(*env->CP0_WatchLo)); > > > > Maybe better code > > > > memset(env->CP0_WatchLo, 0, 8 * sizeof(target_ulong)); > > > > ** Affects: qemu > > Importance: Undecided > > Status: New >=20 > This might be an error. I think it should be >=20 > memset(env->CP0_WatchLo, 0, sizeof(env->CP0_WatchLo)); >=20 I confirm this is the correct version of the code. Someone is sending a patch, i should I do that? Aurelien --=20 Aurelien Jarno GPG: 4096R/1DDD8C9B aurelien@aurel32.net http://www.aurel32.net