Recent versions of GCC report the following error when compiling
target-mips/helper.c:
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]
This is indeed correct and due to a wrong usage of sizeof(). Fix that.
Cc: Stefan Weil <[email protected]>
Cc: Leon Alrae <[email protected]>
Cc: [email protected]
LP: https://bugs.launchpad.net/qemu/+bug/
1577841
Signed-off-by: Aurelien Jarno <[email protected]>
Reviewed-by: Stefan Weil <[email protected]>
Reviewed-by: Leon Alrae <[email protected]>
Signed-off-by: Leon Alrae <[email protected]>
break;
case EXCP_SRESET:
env->CP0_Status |= (1 << CP0St_SR);
- memset(env->CP0_WatchLo, 0, sizeof(*env->CP0_WatchLo));
+ memset(env->CP0_WatchLo, 0, sizeof(env->CP0_WatchLo));
goto set_error_EPC;
case EXCP_NMI:
env->CP0_Status |= (1 << CP0St_NMI);