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 via email to