diff options
author | Gabe Black <gabeblack@google.com> | 2019-09-11 17:12:54 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2019-09-13 00:55:25 +0000 |
commit | b87670f17242f7e171df12c22e9f3e769a241836 (patch) | |
tree | c397843b3d27b937f31d1ad3b117f2b977b6d555 /src | |
parent | c9fabe117947a82e05bf08cbf4f69365c2334304 (diff) | |
download | gem5-b87670f17242f7e171df12c22e9f3e769a241836.tar.xz |
sparc: Fix a warning/error in tlb.cc.
gcc has started to not like memseting an ojbect to zero in some cases.
Cast the TlbEntry pointer to a void * before memsetting it to placate
gcc.
Change-Id: Iccb3c326fdb82f1f111329ff1a80bb6719cace47
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20830
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/arch/sparc/tlb.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/arch/sparc/tlb.cc b/src/arch/sparc/tlb.cc index 8564c4399..e6e2c00ca 100644 --- a/src/arch/sparc/tlb.cc +++ b/src/arch/sparc/tlb.cc @@ -61,7 +61,7 @@ TLB::TLB(const Params *p) fatal("SPARC T1 TLB registers don't support more than 64 TLB entries"); tlb = new TlbEntry[size]; - std::memset(tlb, 0, sizeof(TlbEntry) * size); + std::memset((void *)tlb, 0, sizeof(TlbEntry) * size); for (int x = 0; x < size; x++) freeList.push_back(&tlb[x]); |