MadMaurice has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/12685

Change subject: Fix error class-memaccess with GCC >= 8.1
......................................................................

Fix error class-memaccess with GCC >= 8.1

From GCC 8.1 on GCC issues a warning when using memset et al on structs and
classes. With the way gem5 builds, this actually prevents successful builds.
For cleaning an object one should use the copy constructor with an empty object
instead.

Change-Id: I3ed3fd9714be5d253aba01ca00b1863e1ae5cb68
---
M src/dev/arm/ufs_device.cc
1 file changed, 1 insertion(+), 1 deletion(-)



diff --git a/src/dev/arm/ufs_device.cc b/src/dev/arm/ufs_device.cc
index cd1bbca..91fc0c4 100644
--- a/src/dev/arm/ufs_device.cc
+++ b/src/dev/arm/ufs_device.cc
@@ -161,7 +161,7 @@
 UFSHostDevice::UFSSCSIDevice::SCSICMDHandle(uint32_t* SCSI_msg)
 {
     struct SCSIReply scsi_out;
-    memset(&scsi_out, 0, sizeof(struct SCSIReply));
+    scsi_out = {};

     /**
      * Create the standard SCSI reponse information

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/12685
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I3ed3fd9714be5d253aba01ca00b1863e1ae5cb68
Gerrit-Change-Number: 12685
Gerrit-PatchSet: 1
Gerrit-Owner: MadMaurice <madnaur...@googlemail.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to