From: Stefan Weil <sw@weilnetz.de>
To: Bug 1577841 <1577841@bugs.launchpad.net>,
qemu-devel@nongnu.org, Aurelien Jarno <aurelien@aurel32.net>
Subject: Re: [Qemu-devel] [Bug 1577841] [NEW] target-mips/helper.c:542: bad sizeof ?
Date: Tue, 3 May 2016 20:11:16 +0200 [thread overview]
Message-ID: <5728E9C4.4060706@weilnetz.de> (raw)
In-Reply-To: <20160503155857.23801.56272.malonedeb@gac.canonical.com>
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: ‘memset’ 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
This might be an error. I think it should be
memset(env->CP0_WatchLo, 0, sizeof(env->CP0_WatchLo));
(this corresponds to your suggested code)
Regards
Stefan
next prev parent reply other threads:[~2016-05-03 18:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-03 15:58 [Qemu-devel] [Bug 1577841] [NEW] target-mips/helper.c:542: bad sizeof ? dcb
2016-05-03 18:11 ` Stefan Weil [this message]
2016-05-03 21:11 ` Aurelien Jarno
2016-05-03 21:41 ` Stefan Weil
2016-05-27 7:24 ` [Qemu-devel] [Bug 1577841] " T. Huth
2016-09-02 21:07 ` T. Huth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5728E9C4.4060706@weilnetz.de \
--to=sw@weilnetz.de \
--cc=1577841@bugs.launchpad.net \
--cc=aurelien@aurel32.net \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.