From 4fdfd98230e780aeb068e3740742c7bff28fb859 Mon Sep 17 00:00:00 2001 From: Jason Lowe-Power Date: Thu, 2 Aug 2018 18:07:51 -0700 Subject: misc: Appease GCC 8 GCC 8 adds a number of new warnings to -Wall which generate errors. - Fix memset to 0 for structs by adding casts. - Fix cast with const when the const was ignored. - Fix catch a polymorphic type by value We now compile with GCC 8! Change-Id: Iab70ce11190eee67608fc25c0bedff170152b153 Signed-off-by: Jason Lowe-Power Reviewed-on: https://gem5-review.googlesource.com/11949 Reviewed-by: Daniel Carvalho Reviewed-by: Andreas Sandberg --- src/dev/storage/ide_ctrl.hh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/dev/storage/ide_ctrl.hh') diff --git a/src/dev/storage/ide_ctrl.hh b/src/dev/storage/ide_ctrl.hh index 94a9c65e5..24d3da02a 100644 --- a/src/dev/storage/ide_ctrl.hh +++ b/src/dev/storage/ide_ctrl.hh @@ -81,6 +81,10 @@ class IdeController : public PciDevice /** Registers used for bus master interface */ struct BMIRegs { + void reset() { + memset(static_cast(this), 0, sizeof(*this)); + } + BMICommandReg command; uint8_t reserved0; BMIStatusReg status; -- cgit v1.2.3