[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-stable] [PATCH 07/56] target-mips: fix call to memset in soft rese
From: |
Michael Roth |
Subject: |
[Qemu-stable] [PATCH 07/56] target-mips: fix call to memset in soft reset code |
Date: |
Mon, 8 Aug 2016 16:03:38 -0500 |
From: Aurelien Jarno <address@hidden>
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 <address@hidden>
Cc: Leon Alrae <address@hidden>
Cc: address@hidden
LP: https://bugs.launchpad.net/qemu/+bug/1577841
Signed-off-by: Aurelien Jarno <address@hidden>
Reviewed-by: Stefan Weil <address@hidden>
Reviewed-by: Leon Alrae <address@hidden>
Signed-off-by: Leon Alrae <address@hidden>
(cherry picked from commit 9d989c732b153fe1576adbddb9879313a24d3cd2)
Signed-off-by: Michael Roth <address@hidden>
---
target-mips/helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target-mips/helper.c b/target-mips/helper.c
index 1004ede..cfea177 100644
--- a/target-mips/helper.c
+++ b/target-mips/helper.c
@@ -539,7 +539,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);
--
1.9.1
- [Qemu-stable] [PATCH 49/56] Fix some typos found by codespell, (continued)
- [Qemu-stable] [PATCH 49/56] Fix some typos found by codespell, Michael Roth, 2016/08/08
- [Qemu-stable] [PATCH 52/56] nbd: Limit nbdflags to 16 bits, Michael Roth, 2016/08/08
- [Qemu-stable] [PATCH 53/56] pcie: fix link active status bit migration, Michael Roth, 2016/08/08
- [Qemu-stable] [PATCH 51/56] nbd: Don't use *_to_cpup() functions, Michael Roth, 2016/08/08
- [Qemu-stable] [PATCH 55/56] virtio: error out if guest exceeds virtqueue size, Michael Roth, 2016/08/08
- [Qemu-stable] [PATCH 54/56] target-i386: fix typo in xsetbv implementation, Michael Roth, 2016/08/08
- [Qemu-stable] [PATCH 06/56] usb:xhci: no DMA on HC reset, Michael Roth, 2016/08/08
- [Qemu-stable] [PATCH 56/56] ide: fix halted IO segfault at reset, Michael Roth, 2016/08/08
- [Qemu-stable] [PATCH 08/56] target-i386: key sfence availability on CPUID_SSE, not CPUID_SSE2, Michael Roth, 2016/08/08
- [Qemu-stable] [PATCH 07/56] target-mips: fix call to memset in soft reset code,
Michael Roth <=
- [Qemu-stable] [PATCH 05/56] exec.c: Ensure right alignment also for file backed ram, Michael Roth, 2016/08/08
- Re: [Qemu-stable] [PATCH 00/56] Patch Round-up for stable 2.6.1, freeze on 2016-08-12, Cole Robinson, 2016/08/08
- Re: [Qemu-stable] [PATCH 00/56] Patch Round-up for stable 2.6.1, freeze on 2016-08-12, Michael Roth, 2016/08/09
- Re: [Qemu-stable] [Qemu-devel] [PATCH 00/56] Patch Round-up for stable 2.6.1, freeze on 2016-08-12, Bruce Rogers, 2016/08/09