From 718806761f1e9d903d61408e2039357bfe46fff8 Mon Sep 17 00:00:00 2001 From: Oliver Jean Eifler Date: Tue, 17 May 2022 06:23:03 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20Suppress=20ZERO()=20warning=20(#?= =?UTF-8?q?24178)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/core/macros.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/core/macros.h b/Marlin/src/core/macros.h index 8e52152c14..648307656e 100644 --- a/Marlin/src/core/macros.h +++ b/Marlin/src/core/macros.h @@ -278,7 +278,7 @@ #define NUMERIC_SIGNED(a) (NUMERIC(a) || (a) == '-' || (a) == '+') #define DECIMAL_SIGNED(a) (DECIMAL(a) || (a) == '-' || (a) == '+') #define COUNT(a) (sizeof(a)/sizeof(*a)) -#define ZERO(a) memset(a,0,sizeof(a)) +#define ZERO(a) memset((void*)a,0,sizeof(a)) #define COPY(a,b) do{ \ static_assert(sizeof(a[0]) == sizeof(b[0]), "COPY: '" STRINGIFY(a) "' and '" STRINGIFY(b) "' types (sizes) don't match!"); \ memcpy(&a[0],&b[0],_MIN(sizeof(a),sizeof(b))); \