From 94ef697ea615498e6cef13ed9a8987202d3b2742 Mon Sep 17 00:00:00 2001 From: Adam Lederer Date: Sun, 18 Aug 2024 05:16:38 -0700 Subject: [PATCH] cheat to avoid warning -Werror=class-memaccess on linux --- src/engine/instrument.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/instrument.h b/src/engine/instrument.h index 473cf777e..bf04dac2e 100644 --- a/src/engine/instrument.h +++ b/src/engine/instrument.h @@ -1025,7 +1025,7 @@ struct DivInstrument : DivInstrumentPOD { DivInstrument() : name("") { // clear and construct DivInstrumentPOD so it doesn't have any garbage in the padding - memset((DivInstrumentPOD*)this, 0, sizeof(DivInstrumentPOD)); + memset((unsigned char*)this, 0, sizeof(DivInstrumentPOD)); new ((DivInstrumentPOD*)this) DivInstrumentPOD; } };