target-mips: fix call to memset in soft reset code

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]

Backports commit a525decfaa3449f1458ea2d7a06320cf46aebf3f from qemu
This commit is contained in:
Aurelien Jarno 2018-02-23 14:01:40 -05:00 committed by Lioncash
parent e4903fc5f2
commit 0c4bebb9bc
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -526,7 +526,7 @@ void mips_cpu_do_interrupt(CPUState *cs)
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);