target-mips/helper.c:542: bad sizeof ?

Bug #1577841 reported by dcb
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Fix Released
Undecided
Unassigned

Bug Description

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));

Revision history for this message
Thomas Huth (th-huth) wrote :
Changed in qemu:
status: New → Fix Committed
Thomas Huth (th-huth)
Changed in qemu:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.