All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Weil <sw@weilnetz.de>
To: Aurelien Jarno <aurelien@aurel32.net>
Cc: Bug 1577841 <1577841@bugs.launchpad.net>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Bug 1577841] [NEW] target-mips/helper.c:542: bad sizeof ?
Date: Tue, 3 May 2016 23:41:55 +0200	[thread overview]
Message-ID: <57291B23.1060602@weilnetz.de> (raw)
In-Reply-To: <20160503211130.GA8896@aurel32.net>

Am 03.05.2016 um 23:11 schrieb Aurelien Jarno:
> 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: ‘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));
>>
> 
> I confirm this is the correct version of the code. Someone is sending a
> patch, i should I do that?
> 
> Aurelien


Yes, that would be nice. I don't think the patch is needed for 2.6 as
this code is rather old, so it is sufficient to fix it in the next version.

Thanks,
Stefan

  reply	other threads:[~2016-05-03 21:42 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
2016-05-03 21:11   ` Aurelien Jarno
2016-05-03 21:41     ` Stefan Weil [this message]
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=57291B23.1060602@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.